mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-24 06:53:41 +00:00
Lock iax2 pvt structure when passing off to the AMI function, and make sure it exists. (issue #9674 reported by arabe)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3343,7 +3343,10 @@ static int iax2_answer(struct ast_channel *c)
|
||||
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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user