aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-18 15:46:32 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-18 15:46:32 +0000
commit2577140b5113babb09105091adbba344041c79a8 (patch)
tree2e40c1302e357d0bd3d3de0ae5852b432b495c5e /channels
parent0f3ef377741e598de48f4304f3d509ce3be4d6f3 (diff)
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/branches/1.4@69661 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 362976e65..7fdfb6f27 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12918,7 +12918,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;
}
@@ -13864,7 +13864,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! */
@@ -14157,7 +14158,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 */