[asterisk-commits] trunk r25450 - /trunk/apps/app_mixmonitor.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 8 04:30:33 MST 2006


Author: russell
Date: Mon May  8 06:30:32 2006
New Revision: 25450

URL: http://svn.digium.com/view/asterisk?rev=25450&view=rev
Log:
use ast_channel_(un)lock

Modified:
    trunk/apps/app_mixmonitor.c

Modified: trunk/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_mixmonitor.c?rev=25450&r1=25449&r2=25450&view=diff
==============================================================================
--- trunk/apps/app_mixmonitor.c (original)
+++ trunk/apps/app_mixmonitor.c Mon May  8 06:30:32 2006
@@ -133,9 +133,9 @@
 	if (!chan)
 		return;
 
-	ast_mutex_lock(&chan->lock);
+	ast_channel_lock(chan);
 	ast_channel_spy_remove(chan, spy);
-	ast_mutex_unlock(&chan->lock);
+	ast_channel_unlock(chan);
 }
 
 static int startmon(struct ast_channel *chan, struct ast_channel_spy *spy) 
@@ -146,9 +146,9 @@
 	if (!chan)
 		return -1;
 
-	ast_mutex_lock(&chan->lock);
+	ast_channel_lock(chan);
 	res = ast_channel_spy_add(chan, spy);
-	ast_mutex_unlock(&chan->lock);
+	ast_channel_unlock(chan);
 		
 	if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan)))
 		ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);	
@@ -410,9 +410,9 @@
 
 	LOCAL_USER_ADD(u);
 
-	ast_mutex_lock(&chan->lock);
+	ast_channel_lock(chan);
 	ast_channel_spy_stop_by_type(chan, mixmonitor_spy_type);
-	ast_mutex_unlock(&chan->lock);
+	ast_channel_unlock(chan);
 
 	LOCAL_USER_REMOVE(u);
 
@@ -436,7 +436,7 @@
 	else if (!strcasecmp(argv[1], "stop"))
 		ast_channel_spy_stop_by_type(chan, mixmonitor_spy_type);
 
-	ast_mutex_unlock(&chan->lock);
+	ast_channel_unlock(chan);
 
 	return RESULT_SUCCESS;
 }



More information about the asterisk-commits mailing list