[svn-commits] bbryant: trunk r118702 - /trunk/channels/chan_iax2.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed May 28 11:01:52 CDT 2008
Author: bbryant
Date: Wed May 28 11:01:05 2008
New Revision: 118702
URL: http://svn.digium.com/view/asterisk?view=rev&rev=118702
Log:
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:
trunk/channels/chan_iax2.c
Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=118702&r1=118701&r2=118702
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Wed May 28 11:01:05 2008
@@ -9908,7 +9908,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