[asterisk-commits] file: branch 1.4 r46474 - /branches/1.4/channels/chan_iax2.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Oct 30 11:13:09 MST 2006


Author: file
Date: Mon Oct 30 12:13:07 2006
New Revision: 46474

URL: http://svn.digium.com/view/asterisk?rev=46474&view=rev
Log:
We need to lock the pvt structure during retransmission as another worker thread may be doing something as well.

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?rev=46474&r1=46473&r2=46474&view=diff
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Mon Oct 30 12:13:07 2006
@@ -8060,11 +8060,12 @@
 				continue;
 			
 			f->sentyet++;
-			/* Send a copy immediately -- errors here are ok, so don't bother locking */
+			ast_mutex_lock(&iaxsl[f->callno]);
 			if (iaxs[f->callno]) {
 				send_packet(f);
 				count++;
 			} 
+			ast_mutex_unlock(&iaxsl[f->callno]);
 			if (f->retries < 0) {
 				/* This is not supposed to be retransmitted */
 				AST_LIST_REMOVE(&iaxq.queue, f, list);



More information about the asterisk-commits mailing list