From: Mark Michelson Date: Fri, 17 Apr 2009 20:20:23 +0000 (+0000) Subject: Prevent a crash when SIP blonde transferring an unbridged call. X-Git-Tag: 11.0.0-beta1~5035 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4bf5e1b805a3cf4ba04beb19fec8f5ced027ee4d;p=thirdparty%2Fasterisk.git Prevent a crash when SIP blonde transferring an unbridged call. If one attempts to use the attended transfer button on a SIP phone to transfer an unbridged call (such as a call to an IVR) but hangs up while the target of the transfer is still ringing, we need to not crash. The problem was that ast_hangup was called from outside the channel thread. AST-211 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189097 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5d1b5e946e..39b90a901d 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -20067,11 +20067,7 @@ static int local_attended_transfer(struct sip_pvt *transferer, struct sip_dual * append_history(transferer, "Xfer", "Refer failed"); if (targetcall_pvt->owner) ast_channel_unlock(targetcall_pvt->owner); - /* Right now, we have to hangup, sorry. Bridge is destroyed */ - if (res != -2) - ast_hangup(transferer->owner); - else - ast_clear_flag(&transferer->flags[0], SIP_DEFER_BYE_ON_TRANSFER); + ast_clear_flag(&transferer->flags[0], SIP_DEFER_BYE_ON_TRANSFER); } else { struct ast_party_connected_line connected_caller;