[asterisk-commits] russell: branch 1.4 r77794 - /branches/1.4/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 30 15:16:43 CDT 2007


Author: russell
Date: Mon Jul 30 15:16:43 2007
New Revision: 77794

URL: http://svn.digium.com/view/asterisk?view=rev&rev=77794
Log:
Fix an issue that could potentially cause corruption of the global iax frame
queue.  In the network_thread() loop, it traverses the list using the
AST_LIST_TRAVERSE_SAFE macro.  However, to remove an element of the list within
this loop, it used AST_LIST_REMOVE, instead of AST_LIST_REMOVE_CURRENT, which I
believe could leave some of the internal variables of the SAFE macro invalid.
Mihai says that he already made this change in his local copy and it didn't help
his VNAK storm issues, but I still think it's wrong.  :)

Modified:
    branches/1.4/channels/chan_iax2.c

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=77794&r1=77793&r2=77794
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Mon Jul 30 15:16:43 2007
@@ -8337,7 +8337,7 @@
 
 			if (f->retries < 0) {
 				/* This is not supposed to be retransmitted */
-				AST_LIST_REMOVE(&iaxq.queue, f, list);
+				AST_LIST_REMOVE_CURRENT(&iaxq.queue, list);
 				iaxq.count--;
 				/* Free the iax frame */
 				iax_frame_free(f);




More information about the asterisk-commits mailing list