[asterisk-commits] tilghman: branch 1.4 r61683 - /branches/1.4/main/manager.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Apr 18 21:36:21 MST 2007


Author: tilghman
Date: Wed Apr 18 23:36:20 2007
New Revision: 61683

URL: http://svn.digium.com/view/asterisk?view=rev&rev=61683
Log:
Bug 9557 - simple reason why reading a function always returned NULL

Modified:
    branches/1.4/main/manager.c

Modified: branches/1.4/main/manager.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/manager.c?view=diff&rev=61683&r1=61682&r2=61683
==============================================================================
--- branches/1.4/main/manager.c (original)
+++ branches/1.4/main/manager.c Wed Apr 18 23:36:20 2007
@@ -1391,7 +1391,7 @@
 	const char *varname = astman_get_header(m, "Variable");
 	const char *id = astman_get_header(m,"ActionID");
 	char *varval;
-	char workspace[1024];
+	char workspace[1024] = "";
 
 	if (ast_strlen_zero(varname)) {
 		astman_send_error(s, m, "No variable specified");
@@ -1410,6 +1410,7 @@
 		char *copy = ast_strdupa(varname);
 
 		ast_func_read(c, copy, workspace, sizeof(workspace));
+		varval = workspace;
 	} else {
 		pbx_retrieve_variable(c, varname, &varval, workspace, sizeof(workspace), NULL);
 	}



More information about the asterisk-commits mailing list