mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user