[asterisk-commits] jrose: branch 1.8 r317283 - /branches/1.8/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 5 14:09:21 CDT 2011
Author: jrose
Date: Thu May 5 14:09:13 2011
New Revision: 317283
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=317283
Log:
Resolves a deadlock that occurs during sip_new
This is based on an uncommitted patch by jpeeler for the issue. Instead of
relocking and then unlocking the channel though, we keep the lock on the channel
until we are finished doing what we need to the channel.
(closes issue #18441)
Reported by: Alric
Modified:
branches/1.8/channels/chan_sip.c
Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=317283&r1=317282&r2=317283
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Thu May 5 14:09:13 2011
@@ -6681,7 +6681,6 @@
sip_pvt_lock(i);
ast_channel_cc_params_init(tmp, i->cc_params);
tmp->caller.id.tag = ast_strdup(i->cid_tag);
- ast_channel_unlock(tmp);
tmp->tech = ( ast_test_flag(&i->flags[0], SIP_DTMF) == SIP_DTMF_INFO || ast_test_flag(&i->flags[0], SIP_DTMF) == SIP_DTMF_SHORTINFO) ? &sip_tech_info : &sip_tech;
@@ -6837,6 +6836,8 @@
char valuebuf[1024];
pbx_builtin_setvar_helper(tmp, v->name, ast_get_encoded_str(v->value, valuebuf, sizeof(valuebuf)));
}
+
+ ast_channel_unlock(tmp); /* ast_hangup requires the channel to be unlocked */
if (state != AST_STATE_DOWN && ast_pbx_start(tmp)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
More information about the asterisk-commits
mailing list