<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/20005">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span></span><br></pre><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  N A: Looks good to me, but someone else must approve
  Friendly Automation: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Revert "pbx_ael: Global variables are not expanded."<br><br>This reverts commit f67258d17283f245b0d8a34c2288ca290fe679bf.<br><br>Reason for revert: Behavior change that breaks existing dialplan.<br><br>ASTERISK-30472 #close<br><br>Change-Id: Ia03fa7f049f964ed396f6bf6d7ca096b665aa6b3<br>---<br>M res/ael/pval.c<br>1 file changed, 18 insertions(+), 11 deletions(-)<br><br></pre>
<pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/ael/pval.c b/res/ael/pval.c</span><br><span>index 8596d66..10af159 100644</span><br><span>--- a/res/ael/pval.c</span><br><span>+++ b/res/ael/pval.c</span><br><span>@@ -4414,11 +4414,7 @@</span><br><span> {</span><br><span>   pval *p,*p2;</span><br><span>         struct ast_context *context;</span><br><span style="color: hsl(0, 100%, 40%);">-#ifdef LOW_MEMORY</span><br><span>        char buf[2000];</span><br><span style="color: hsl(0, 100%, 40%);">-#else</span><br><span style="color: hsl(0, 100%, 40%);">-    char buf[8192];</span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span>        struct ael_extension *exten;</span><br><span>         struct ael_extension *exten_list = 0;</span><br><span> </span><br><span>@@ -4431,13 +4427,9 @@</span><br><span>           case PV_GLOBALS:</span><br><span>                     /* just VARDEC elements */</span><br><span>                   for (p2=p->u1.list; p2; p2=p2->next) {</span><br><span style="color: hsl(0, 100%, 40%);">-#ifdef STANDALONE</span><br><span style="color: hsl(0, 100%, 40%);">-                           snprintf(buf, sizeof(buf), "%s=%s", p2->u1.str, p2->u2.val);</span><br><span style="color: hsl(0, 100%, 40%);">-                            pbx_builtin_setvar(NULL, buf);</span><br><span style="color: hsl(0, 100%, 40%);">-#else</span><br><span style="color: hsl(0, 100%, 40%);">-                             pbx_substitute_variables_helper(NULL, p2->u2.val, buf, sizeof(buf) - 1);</span><br><span style="color: hsl(0, 100%, 40%);">-                             pbx_builtin_setvar_helper(NULL, p2->u1.str, buf);</span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span style="color: hsl(120, 100%, 40%);">+                            char buf2[2000];</span><br><span style="color: hsl(120, 100%, 40%);">+                              snprintf(buf2,sizeof(buf2),"%s=%s", p2->u1.str, p2->u2.val);</span><br><span style="color: hsl(120, 100%, 40%);">+                          pbx_builtin_setvar(NULL, buf2);</span><br><span>                      }</span><br><span>                    break;</span><br><span>               default:</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/20005">change 20005</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/20005"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: Ia03fa7f049f964ed396f6bf6d7ca096b665aa6b3 </div>
<div style="display:none"> Gerrit-Change-Number: 20005 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean@seanbright.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Michael Bradeen <mbradeen@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: N A <asterisk@phreaknet.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>