diff options
author | Joshua Colp <jcolp@digium.com> | 2007-11-30 14:45:36 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2007-11-30 14:45:36 +0000 |
commit | 4a5b8ad6b3c6ee360a4c9ed6217be5f3377b369b (patch) | |
tree | 70bc5a29bbb0f33703cbb13149971e1c079cd2d9 /channels/chan_sip.c | |
parent | 2fe8b945fa5f2d3653d3c837d6d20a3456532acf (diff) |
Merged revisions 90269 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r90269 | file | 2007-11-30 10:43:15 -0400 (Fri, 30 Nov 2007) | 6 lines
Fix locking issues under one legged replaces scenarios.
(closes issue #11420)
Reported by: irroot
Patches:
chan_sip_oneleg.patch uploaded by irroot (license 52)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 358d4cf9d..15cd86ef6 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -14773,7 +14773,8 @@ static int handle_invite_replaces(struct sip_pvt *p, struct sip_request *req, in ast_quiet_chan(targetcall); ast_debug(4, "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 */ sip_pvt_unlock(p->refer->refer_call); @@ -14804,7 +14805,8 @@ static int handle_invite_replaces(struct sip_pvt *p, struct sip_request *req, in 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 */ @@ -14835,7 +14837,8 @@ static int handle_invite_replaces(struct sip_pvt *p, struct sip_request *req, in ast_debug(4, "End After transfer:----------------------------\n"); ast_channel_unlock(p->owner); /* Unlock new owner */ - sip_pvt_unlock(p); /* Unlock SIP structure */ + if (!oneleggedreplace) + sip_pvt_unlock(p); /* Unlock SIP structure */ /* The call should be down with no ast_channel, so hang it up */ c->tech_pvt = dialog_unref(c->tech_pvt); |