[asterisk-commits] russell: branch russell/chan_refcount r82332 - /team/russell/chan_refcount/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 13 12:56:21 CDT 2007


Author: russell
Date: Thu Sep 13 12:56:20 2007
New Revision: 82332

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82332
Log:
use ast_channel_lock_both() in one spot

Modified:
    team/russell/chan_refcount/main/channel.c

Modified: team/russell/chan_refcount/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/main/channel.c?view=diff&rev=82332&r1=82331&r2=82332
==============================================================================
--- team/russell/chan_refcount/main/channel.c (original)
+++ team/russell/chan_refcount/main/channel.c Thu Sep 13 12:56:20 2007
@@ -3459,12 +3459,7 @@
 	int res = -1;
 	struct ast_channel *final_orig = original, *final_clone = clone;
 
-	ast_channel_lock(original);
-	while (ast_channel_trylock(clone)) {
-		ast_channel_unlock(original);
-		usleep(1);
-		ast_channel_lock(original);
-	}
+	ast_channel_lock_both(original, clone);
 
 	/* each of these channels may be sitting behind a channel proxy (i.e. chan_agent)
 	   and if so, we don't really want to masquerade it, but its proxy */




More information about the asterisk-commits mailing list