Skip to content
Snippets Groups Projects
Commit 873a46de authored by Tilghman Lesher's avatar Tilghman Lesher
Browse files

If a variable had a blank value upon the initial setting, then it would do nothing.

Identified by Dmitry Andrianov via private email, fixed by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 56903a74
Branches
Tags
No related merge requests found
...@@ -201,21 +201,20 @@ static int frame_set_var(struct ast_channel *chan, struct gosub_stack_frame *fra ...@@ -201,21 +201,20 @@ static int frame_set_var(struct ast_channel *chan, struct gosub_stack_frame *fra
} }
} }
if (!ast_strlen_zero(value)) { if (!found) {
if (!found) { variables = ast_var_assign(var, "");
variables = ast_var_assign(var, ""); AST_LIST_INSERT_HEAD(&frame->varshead, variables, entries);
AST_LIST_INSERT_HEAD(&frame->varshead, variables, entries); pbx_builtin_pushvar_helper(chan, var, value);
pbx_builtin_pushvar_helper(chan, var, value); } else {
} else pbx_builtin_setvar_helper(chan, var, value);
pbx_builtin_setvar_helper(chan, var, value);
manager_event(EVENT_FLAG_DIALPLAN, "VarSet",
"Channel: %s\r\n"
"Variable: LOCAL(%s)\r\n"
"Value: %s\r\n"
"Uniqueid: %s\r\n",
chan->name, var, value, chan->uniqueid);
} }
manager_event(EVENT_FLAG_DIALPLAN, "VarSet",
"Channel: %s\r\n"
"Variable: LOCAL(%s)\r\n"
"Value: %s\r\n"
"Uniqueid: %s\r\n",
chan->name, var, value, chan->uniqueid);
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment