From 6e50550d28f90676a8510045e45f7750b88964b5 Mon Sep 17 00:00:00 2001 From: Sean Bright <sean@seanbright.com> Date: Sun, 19 Mar 2023 16:30:25 -0500 Subject: [PATCH] Revert "pbx_ael: Global variables are not expanded." This reverts commit 56051d1ac5115ff8c55b920fc441613c487fb512. Reason for revert: Behavior change that breaks existing dialplan. ASTERISK-30472 #close Change-Id: I83bed3b800d36228a04ded0a6164b795f7f16bd6 --- res/ael/pval.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/res/ael/pval.c b/res/ael/pval.c index 8596d66373..10af1597e8 100644 --- a/res/ael/pval.c +++ b/res/ael/pval.c @@ -4414,11 +4414,7 @@ int ast_compile_ael2(struct ast_context **local_contexts, struct ast_hashtab *lo { pval *p,*p2; struct ast_context *context; -#ifdef LOW_MEMORY char buf[2000]; -#else - char buf[8192]; -#endif struct ael_extension *exten; struct ael_extension *exten_list = 0; @@ -4431,13 +4427,9 @@ int ast_compile_ael2(struct ast_context **local_contexts, struct ast_hashtab *lo case PV_GLOBALS: /* just VARDEC elements */ for (p2=p->u1.list; p2; p2=p2->next) { -#ifdef STANDALONE - snprintf(buf, sizeof(buf), "%s=%s", p2->u1.str, p2->u2.val); - pbx_builtin_setvar(NULL, buf); -#else - pbx_substitute_variables_helper(NULL, p2->u2.val, buf, sizeof(buf) - 1); - pbx_builtin_setvar_helper(NULL, p2->u1.str, buf); -#endif + char buf2[2000]; + snprintf(buf2,sizeof(buf2),"%s=%s", p2->u1.str, p2->u2.val); + pbx_builtin_setvar(NULL, buf2); } break; default: -- GitLab