From 16e5dde064eb0362f6c16370cb14464b5ea7b910 Mon Sep 17 00:00:00 2001 From: tilghman Date: Wed, 20 May 2009 23:31:26 +0000 Subject: Merged revisions 195839 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r195839 | tilghman | 2009-05-20 18:30:05 -0500 (Wed, 20 May 2009) | 3 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.2@195842 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_stack.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/apps/app_stack.c b/apps/app_stack.c index a3a1bf401..e3f09ea1e 100644 --- a/apps/app_stack.c +++ b/apps/app_stack.c @@ -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) { - variables = ast_var_assign(var, ""); - AST_LIST_INSERT_HEAD(&frame->varshead, variables, entries); - pbx_builtin_pushvar_helper(chan, var, value); - } else - 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); + if (!found) { + variables = ast_var_assign(var, ""); + AST_LIST_INSERT_HEAD(&frame->varshead, variables, entries); + pbx_builtin_pushvar_helper(chan, var, value); + } else { + 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); return 0; } -- cgit v1.2.3