Bug 9557 - simple reason why reading a function always returned NULL

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@61683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2007-04-19 04:36:20 +00:00
parent 1572777fa0
commit 6db075dd98

View File

@@ -1391,7 +1391,7 @@ static int action_getvar(struct mansession *s, const struct message *m)
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 @@ static int action_getvar(struct mansession *s, const struct message *m)
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);
}