mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 11:32:25 +00:00
Merged revisions 128795 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r128795 | russell | 2008-07-07 17:41:48 -0500 (Mon, 07 Jul 2008) | 8 lines Fix handling of when a pvt disappears. Properly return the pvt locked and don't hold the pvt lock while destroying the ast_channel. (closes issue #13014) Reported by: jpgrayson Patches: chan_iax2_ast_iax2_new2.patch uploaded by jpgrayson (license 492) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4091,11 +4091,13 @@ static struct ast_channel *ast_iax2_new(int callno, int state, int capability)
|
||||
ast_mutex_unlock(&iaxsl[callno]);
|
||||
tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, i->amaflags, "IAX2/%s-%d", i->host, i->callno);
|
||||
ast_mutex_lock(&iaxsl[callno]);
|
||||
if (!iaxs[callno]) {
|
||||
if (i != iaxs[callno]) {
|
||||
if (tmp) {
|
||||
ast_channel_free(tmp);
|
||||
}
|
||||
/* unlock and relock iaxsl[callno] to preserve locking order */
|
||||
ast_mutex_unlock(&iaxsl[callno]);
|
||||
ast_channel_free(tmp);
|
||||
ast_mutex_lock(&iaxsl[callno]);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
iax2_ami_channelupdate(i);
|
||||
|
||||
Reference in New Issue
Block a user