[asterisk-commits] file: branch 1.4 r69661 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 18 10:46:32 CDT 2007


Author: file
Date: Mon Jun 18 10:46:32 2007
New Revision: 69661

URL: http://svn.digium.com/view/asterisk?view=rev&rev=69661
Log:
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.

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=69661&r1=69660&r2=69661
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Mon Jun 18 10:46:32 2007
@@ -12918,7 +12918,7 @@
 			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 @@
 		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 @@
     	   be accessible after the transfer! */
 	*nounlock = 1;
 	ast_channel_unlock(current.chan1);
-	ast_channel_unlock(current.chan2);
 
 	/* Connect the call */
 




More information about the asterisk-commits mailing list