[svn-commits] mmichelson: trunk r204530 - /trunk/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jun 30 14:56:03 CDT 2009


Author: mmichelson
Date: Tue Jun 30 14:55:59 2009
New Revision: 204530

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


Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=204530&r1=204529&r2=204530
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jun 30 14:55:59 2009
@@ -20789,11 +20789,7 @@
 		/* 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);
 




More information about the svn-commits mailing list