[asterisk-commits] file: branch 1.4 r90269 - /branches/1.4/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Nov 30 08:43:16 CST 2007
Author: file
Date: Fri Nov 30 08:43:15 2007
New Revision: 90269
URL: http://svn.digium.com/view/asterisk?view=rev&rev=90269
Log:
Fix locking issues under one legged replaces scenarios.
(closes issue #11420)
Reported by: irroot
Patches:
chan_sip_oneleg.patch uploaded by irroot (license 52)
Modified:
branches/1.4/channels/chan_sip.c
Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=90269&r1=90268&r2=90269
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Fri Nov 30 08:43:15 2007
@@ -13405,7 +13405,8 @@
if (option_debug > 3)
ast_log(LOG_DEBUG, "Invite/Replaces: preparing to masquerade %s into %s\n", c->name, replacecall->name);
/* Unlock clone, but not original (replacecall) */
- ast_channel_unlock(c);
+ if (!oneleggedreplace)
+ ast_channel_unlock(c);
/* Unlock PVT */
ast_mutex_unlock(&p->refer->refer_call->lock);
@@ -13437,7 +13438,8 @@
ast_log(LOG_WARNING, "Invite/Replace: Could not read frame from RING channel \n");
}
c->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
- ast_channel_unlock(replacecall);
+ if (!oneleggedreplace)
+ ast_channel_unlock(replacecall);
} else { /* Bridged call, UP channel */
if ((f = ast_read(replacecall))) { /* Force the masq to happen */
/* Masq ok */
@@ -13472,7 +13474,8 @@
}
ast_channel_unlock(p->owner); /* Unlock new owner */
- ast_mutex_unlock(&p->lock); /* Unlock SIP structure */
+ if (!oneleggedreplace)
+ ast_mutex_unlock(&p->lock); /* Unlock SIP structure */
/* The call should be down with no ast_channel, so hang it up */
c->tech_pvt = NULL;
More information about the asterisk-commits
mailing list