diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-18 15:48:05 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-18 15:48:05 +0000 |
commit | ffd70d59c72352dc6aa7705b7e2350b34115641c (patch) | |
tree | 785bab13062bbb8eaeb63e98378dd5a77ccc01b7 /channels/chan_sip.c | |
parent | 6abbfc0dfe2e79e4076034823485f6c911fa8922 (diff) |
Merged revisions 69661 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r69661 | file | 2007-06-18 11:46:32 -0400 (Mon, 18 Jun 2007) | 2 lines
Few minor transfer tweaks. We can't unlock something we never locked, and better handle a specific scenario with doing an attended transfer between two non-bridged calls.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69663 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d5483cb30..7cff8fbda 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -13669,7 +13669,7 @@ static int attempt_transfer(struct sip_dual *transferer, struct sip_dual *target ast_softhangup_nolock(transferer->chan1, AST_SOFTHANGUP_DEV); if (target->chan1) ast_softhangup_nolock(target->chan1, AST_SOFTHANGUP_DEV); - return -1; + return -2; } return 0; } @@ -14587,7 +14587,8 @@ static int local_attended_transfer(struct sip_pvt *transferer, struct sip_dual * if (targetcall_pvt->owner) ast_channel_unlock(targetcall_pvt->owner); /* Right now, we have to hangup, sorry. Bridge is destroyed */ - ast_hangup(transferer->owner); + if (res != -2) + ast_hangup(transferer->owner); } else { /* Transfer succeeded! */ @@ -14877,7 +14878,6 @@ static int handle_request_refer(struct sip_pvt *p, struct sip_request *req, int be accessible after the transfer! */ *nounlock = 1; ast_channel_unlock(current.chan1); - ast_channel_unlock(current.chan2); /* Connect the call */ |