[svn-commits] russell: branch russell/chan_refcount r82361 - /team/russell/chan_refcount/main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Sep 13 18:34:50 CDT 2007


Author: russell
Date: Thu Sep 13 18:34:50 2007
New Revision: 82361

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

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=82361&r1=82360&r2=82361
==============================================================================
--- team/russell/chan_refcount/main/manager.c (original)
+++ team/russell/chan_refcount/main/manager.c Thu Sep 13 18:34:50 2007
@@ -1572,17 +1572,19 @@
 	}
 
 	if (!ast_strlen_zero(name)) {
-		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);
 	}
 
 	pbx_builtin_setvar_helper(c, varname, S_OR(varval, ""));
 
-	if (c)
+	if (c) {
 		ast_channel_unlock(c);
+		ast_channel_unref(c);
+	}
 
 	astman_send_ack(s, m, "Variable Set");
 




More information about the svn-commits mailing list