<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19838">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pbx_ael: Global variables are not expanded.<br><br>Variable references within global variable assignments are now<br>expanded rather than being included literally.<br><br>ASTERISK-30406 #close<br><br>Change-Id: I136e8d6395e90a4c92d9777a46a7bc3edb08d05d<br>---<br>M res/ael/pval.c<br>1 file changed, 25 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/38/19838/1</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 10af159..8596d66 100644</span><br><span>--- a/res/ael/pval.c</span><br><span>+++ b/res/ael/pval.c</span><br><span>@@ -4414,7 +4414,11 @@</span><br><span> {</span><br><span>  pval *p,*p2;</span><br><span>         struct ast_context *context;</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef LOW_MEMORY</span><br><span>      char buf[2000];</span><br><span style="color: hsl(120, 100%, 40%);">+#else</span><br><span style="color: hsl(120, 100%, 40%);">+        char buf[8192];</span><br><span style="color: hsl(120, 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>@@ -4427,9 +4431,13 @@</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%);">-                            char buf2[2000];</span><br><span style="color: hsl(0, 100%, 40%);">-                                snprintf(buf2,sizeof(buf2),"%s=%s", p2->u1.str, p2->u2.val);</span><br><span style="color: hsl(0, 100%, 40%);">-                            pbx_builtin_setvar(NULL, buf2);</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef STANDALONE</span><br><span style="color: hsl(120, 100%, 40%);">+                            snprintf(buf, sizeof(buf), "%s=%s", p2->u1.str, p2->u2.val);</span><br><span style="color: hsl(120, 100%, 40%);">+                          pbx_builtin_setvar(NULL, buf);</span><br><span style="color: hsl(120, 100%, 40%);">+#else</span><br><span style="color: hsl(120, 100%, 40%);">+                         pbx_substitute_variables_helper(NULL, p2->u2.val, buf, sizeof(buf) - 1);</span><br><span style="color: hsl(120, 100%, 40%);">+                           pbx_builtin_setvar_helper(NULL, p2->u1.str, buf);</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</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/+/19838">change 19838</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/+/19838"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 20 </div>
<div style="display:none"> Gerrit-Change-Id: I136e8d6395e90a4c92d9777a46a7bc3edb08d05d </div>
<div style="display:none"> Gerrit-Change-Number: 19838 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean@seanbright.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>