[svn-commits] bbryant: branch 1.4 r118716 - /branches/1.4/channels/chan_iax2.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed May 28 11:10:50 CDT 2008


Author: bbryant
Date: Wed May 28 11:10:48 2008
New Revision: 118716

URL: http://svn.digium.com/view/asterisk?view=rev&rev=118716
Log:
merge revision 118702 from trunk to 1.4 -- Fixes a bug in chan_iax that uses send_command to poke a peer while a channel is unlocked in some cases, and because it can cause seemingly random failures could be related to some bugs in the tracker...

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=118716&r1=118715&r2=118716
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Wed May 28 11:10:48 2008
@@ -8878,7 +8878,11 @@
 		peer_unref(peer);
 
 	/* And send the poke */
-	send_command(iaxs[peer->callno], AST_FRAME_IAX, IAX_COMMAND_POKE, 0, NULL, 0, -1);
+	ast_mutex_lock(&iaxsl[peer->callno]);
+	if (iaxs[peer->callno]) {
+		send_command(iaxs[peer->callno], AST_FRAME_IAX, IAX_COMMAND_POKE, 0, NULL, 0, -1);
+	}
+	ast_mutex_unlock(&iaxsl[peer->callno]);
 
 	return 0;
 }




More information about the svn-commits mailing list