[Asterisk-code-review] Message.c: Clear message channel frames on cleanup (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Wed May 13 16:51:18 CDT 2015


Richard Mudgett has posted comments on this change.

Change subject: Message.c: Clear message channel frames on cleanup
......................................................................


Patch Set 1: Code-Review-1

(3 comments)

https://gerrit.asterisk.org/#/c/466/1//COMMIT_MSG
Commit Message:

Line 9: The message channel is special channel that doesn't actually process frames.
...is a special...


Line 10: However, certain actions can cause frames to be placed in channel's read
...in the channel's...


https://gerrit.asterisk.org/#/c/466/1/main/message.c
File main/message.c:

Line 778: 	AST_LIST_TRAVERSE_SAFE_BEGIN(ast_channel_readq(chan), cur, frame_list) {
        : 		AST_LIST_REMOVE_CURRENT(frame_list);
        : 		ast_frfree(cur);
        : 	}
        : 	AST_LIST_TRAVERSE_SAFE_END;
You don't need to use the safe traversal loop.  It adds unnecessary overhead.

while ((cur = AST_LIST_REMOVE_HEAD(...)) {
  ast_free(cur);
}


-- 
To view, visit https://gerrit.asterisk.org/466
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idf18df73ccd8c220be38743335b5c79c2a4c0d0f
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Jonathan Rose <jrose at digium.com>
Gerrit-Reviewer: Jonathan Rose <jrose at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list