[Asterisk-code-review] Revert "pbx_ael: Global variables are not expanded." (asterisk[18])

Sean Bright asteriskteam at digium.com
Sun Mar 19 16:30:18 CDT 2023


Attention is currently required from: Michael Bradeen, N A, George Joseph.

Hello Michael Bradeen, N A, George Joseph, Friendly Automation,

I'd like you to do a code review.
Please visit

    https://gerrit.asterisk.org/c/asterisk/+/20005

to review the following change.


Change subject: Revert "pbx_ael: Global variables are not expanded."
......................................................................

Revert "pbx_ael: Global variables are not expanded."

This reverts commit f67258d17283f245b0d8a34c2288ca290fe679bf.

Reason for revert: Behavior change that breaks existing dialplan.

ASTERISK-30472 #close

Change-Id: Ia03fa7f049f964ed396f6bf6d7ca096b665aa6b3
---
M res/ael/pval.c
1 file changed, 18 insertions(+), 11 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/05/20005/1

diff --git a/res/ael/pval.c b/res/ael/pval.c
index 8596d66..10af159 100644
--- a/res/ael/pval.c
+++ b/res/ael/pval.c
@@ -4414,11 +4414,7 @@
 {
 	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 @@
 		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:

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/20005
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: Ia03fa7f049f964ed396f6bf6d7ca096b665aa6b3
Gerrit-Change-Number: 20005
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: N A <asterisk at phreaknet.org>
Gerrit-Attention: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Attention: N A <asterisk at phreaknet.org>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230319/cde06502/attachment.html>


More information about the asterisk-code-review mailing list