[asterisk-commits] russell: branch russell/chan_refcount r82362 - /team/russell/chan_refcount/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 13 18:38:37 CDT 2007
Author: russell
Date: Thu Sep 13 18:38:36 2007
New Revision: 82362
URL: http://svn.digium.com/view/asterisk?view=rev&rev=82362
Log:
convert action_getvar
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=82362&r1=82361&r2=82362
==============================================================================
--- team/russell/chan_refcount/main/manager.c (original)
+++ team/russell/chan_refcount/main/manager.c Thu Sep 13 18:38:36 2007
@@ -1612,11 +1612,11 @@
}
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);
}
if (varname[strlen(varname) - 1] == ')') {
@@ -1626,8 +1626,11 @@
pbx_retrieve_variable(c, varname, &varval, workspace, sizeof(workspace), NULL);
}
- if (c)
+ if (c) {
ast_channel_unlock(c);
+ ast_channel_unref(c);
+ }
+
astman_start_ack(s, m);
astman_append(s, "Variable: %s\r\nValue: %s\r\n\r\n", varname, varval);
More information about the asterisk-commits
mailing list