[asterisk-commits] file: trunk r63182 - /trunk/channels/chan_iax2.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun May 6 13:09:18 MST 2007
Author: file
Date: Sun May 6 15:09:18 2007
New Revision: 63182
URL: http://svn.digium.com/view/asterisk?view=rev&rev=63182
Log:
Lock iax2 pvt structure when passing off to the AMI function, and make sure it exists. (issue #9674 reported by arabe)
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=63182&r1=63181&r2=63182
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Sun May 6 15:09:18 2007
@@ -3343,7 +3343,10 @@
unsigned short callno = PTR_TO_CALLNO(c->tech_pvt);
if (option_debug)
ast_log(LOG_DEBUG, "Answering IAX2 call\n");
- iax2_ami_channelupdate(c->tech_pvt);
+ ast_mutex_lock(&iaxsl[callno]);
+ if (iaxs[callno])
+ iax2_ami_channelupdate(iaxs[callno]);
+ ast_mutex_unlock(&iaxsl[callno]);
return send_command_locked(callno, AST_FRAME_CONTROL, AST_CONTROL_ANSWER, 0, NULL, 0, -1);
}
More information about the asterisk-commits
mailing list