[asterisk-commits] file: trunk r46475 - in /trunk: ./ channels/chan_iax2.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Oct 30 11:17:03 MST 2006


Author: file
Date: Mon Oct 30 12:17:02 2006
New Revision: 46475

URL: http://svn.digium.com/view/asterisk?rev=46475&view=rev
Log:
Merged revisions 46474 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46474 | file | 2006-10-30 13:13:07 -0500 (Mon, 30 Oct 2006) | 2 lines

We need to lock the pvt structure during retransmission as another worker thread may be doing something as well.

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_iax2.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?rev=46475&r1=46474&r2=46475&view=diff
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Mon Oct 30 12:17:02 2006
@@ -8084,11 +8084,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