Merged revisions 182530 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

........
  r182530 | kpfleming | 2009-03-17 09:59:33 -0500 (Tue, 17 Mar 2009) | 2 lines
  
  correct logic flaw in ast_answer() changes in r182525
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@182533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2009-03-17 15:00:45 +00:00
parent 4d1d39c1e7
commit 860b5570e3

View File

@@ -1812,7 +1812,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);
}