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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 14 16:32:29 CDT 2007


Author: russell
Date: Fri Sep 14 16:32:28 2007
New Revision: 82458

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82458
Log:
convert action_sendtext

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

Modified: team/russell/chan_refcount/main/manager.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/main/manager.c?view=diff&rev=82458&r1=82457&r2=82458
==============================================================================
--- team/russell/chan_refcount/main/manager.c (original)
+++ team/russell/chan_refcount/main/manager.c Fri Sep 14 16:32:28 2007
@@ -1751,14 +1751,15 @@
 		return 0;
 	}
 
-	c = ast_get_channel_by_name_locked(name);
-	if (!c) {
+	if (!(c = ast_channel_get_by_name(name))) {
 		astman_send_error(s, m, "No such channel");
 		return 0;
 	}
 
+	ast_channel_lock(c);
 	res = ast_sendtext(c, textmsg);
-	ast_mutex_unlock(&c->lock);
+	ast_channel_unlock(c);
+	c = ast_channel_unref(c);
 	
 	if (res > 0)
 		astman_send_ack(s, m, "Success");




More information about the asterisk-commits mailing list