<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18464">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_meetme: Don't erroneously set global variables.<br><br>The admin_exec function in app_meetme is used by the SLA<br>applications for internal bridging. However, in these cases,<br>chan is NULL. Currently, this function will set some status<br>variables that are intended for a channel, but since channel<br>is NULL, this is erroneously creating meaningless global<br>variables, which shouldn't be happening. This sets these<br>variables only if chan is not NULL.<br><br>ASTERISK-30002 #close<br><br>Change-Id: I817df6c26f5bda131678e56791b0b61ba64fc6f7<br>---<br>M apps/app_meetme.c<br>1 file changed, 12 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/64/18464/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_meetme.c b/apps/app_meetme.c</span><br><span>index 17ff202..d71ffb2 100644</span><br><span>--- a/apps/app_meetme.c</span><br><span>+++ b/apps/app_meetme.c</span><br><span>@@ -5239,7 +5239,9 @@</span><br><span> </span><br><span>         if (ast_strlen_zero(data)) {</span><br><span>                 ast_log(LOG_WARNING, "MeetMeAdmin requires an argument!\n");</span><br><span style="color: hsl(0, 100%, 40%);">-          pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", "NOPARSE");</span><br><span style="color: hsl(120, 100%, 40%);">+          if (chan) {</span><br><span style="color: hsl(120, 100%, 40%);">+                   pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", "NOPARSE");</span><br><span style="color: hsl(120, 100%, 40%);">+          }</span><br><span>            return -1;</span><br><span>   }</span><br><span> </span><br><span>@@ -5248,7 +5250,9 @@</span><br><span> </span><br><span>    if (!args.command) {</span><br><span>                 ast_log(LOG_WARNING, "MeetmeAdmin requires a command!\n");</span><br><span style="color: hsl(0, 100%, 40%);">-            pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", "NOPARSE");</span><br><span style="color: hsl(120, 100%, 40%);">+          if (chan) {</span><br><span style="color: hsl(120, 100%, 40%);">+                   pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", "NOPARSE");</span><br><span style="color: hsl(120, 100%, 40%);">+          }</span><br><span>            return -1;</span><br><span>   }</span><br><span> </span><br><span>@@ -5261,7 +5265,9 @@</span><br><span>        if (!cnf) {</span><br><span>          ast_log(LOG_WARNING, "Conference number '%s' not found!\n", args.confno);</span><br><span>          AST_LIST_UNLOCK(&confs);</span><br><span style="color: hsl(0, 100%, 40%);">-            pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", "NOTFOUND");</span><br><span style="color: hsl(120, 100%, 40%);">+         if (chan) {</span><br><span style="color: hsl(120, 100%, 40%);">+                   pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", "NOTFOUND");</span><br><span style="color: hsl(120, 100%, 40%);">+         }</span><br><span>            return 0;</span><br><span>    }</span><br><span> </span><br><span>@@ -5384,7 +5390,9 @@</span><br><span>        AST_LIST_UNLOCK(&confs);</span><br><span> </span><br><span>     dispose_conf(cnf);</span><br><span style="color: hsl(0, 100%, 40%);">-      pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", res == -2 ? "NOTFOUND" : res ? "FAILED" : "OK");</span><br><span style="color: hsl(120, 100%, 40%);">+ if (chan) {</span><br><span style="color: hsl(120, 100%, 40%);">+           pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", res == -2 ? "NOTFOUND" : res ? "FAILED" : "OK");</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> </span><br><span>        return 0;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18464">change 18464</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/+/18464"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I817df6c26f5bda131678e56791b0b61ba64fc6f7 </div>
<div style="display:none"> Gerrit-Change-Number: 18464 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>