diff options
author | Mark Michelson <mmichelson@digium.com> | 2009-06-30 19:55:59 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2009-06-30 19:55:59 +0000 |
commit | ab2b9bd16d965d94ec6faeedf7e9875d4542b5cd (patch) | |
tree | 5e949aed17c493932948b49042ccc721cc1123ad /channels | |
parent | 51d7dc5d83e6d293997eb729b2eec29faf32626a (diff) |
Remove some bogus deadlock avoidance code from local_attended_transfer.
First of all, the code was unnecessary. The goal was to lock a channel
which was already locked. Second, the assumption of the deadlock avoidance
loop was that the sip_pvt was already locked and we were trying to get the
channel lock. The problem is that the sip_pvt was unlocked a few lines above.
Basically, I'm removing 5 lines of no-op.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d3e67fefc..1226206e4 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -20789,11 +20789,7 @@ static int local_attended_transfer(struct sip_pvt *transferer, struct sip_dual * /* Transfer succeeded! */ const char *xfersound = pbx_builtin_getvar_helper(target.chan1, "ATTENDED_TRANSFER_COMPLETE_SOUND"); - while (ast_channel_trylock(target.chan1)) { - sip_pvt_unlock(targetcall_pvt); - sched_yield(); - sip_pvt_lock(targetcall_pvt); - } + /* target.chan1 was locked in get_sip_pvt_byid_locked */ ast_cel_report_event(target.chan1, AST_CEL_ATTENDEDTRANSFER, NULL, transferer_linkedid, target.chan2); ast_channel_unlock(target.chan1); |