correct logic flaw in ast_answer() changes in r182525

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2009-03-17 14:59:33 +00:00
parent d11b6386a5
commit 16b9280ba9

View File

@@ -1837,7 +1837,8 @@ int __ast_answer(struct ast_channel *chan, unsigned int delay, int cdr_answer)
if (res == 0) {
ast_channel_lock(chan);
while ((cur = AST_LIST_REMOVE(&frames, AST_LIST_LAST(&frames), frame_list))) {
while ((cur = AST_LIST_LAST(&frames))) {
AST_LIST_REMOVE(&frames, cur, frame_list);
ast_queue_frame_head(chan, cur);
ast_frfree(cur);
}