<p>Joshua Colp <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18465">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  Kevin Harwell: Looks good to me, approved
  Benjamin Keith Ford: Looks good to me, but someone else must approve

</div><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;"><span>diff --git a/apps/app_meetme.c b/apps/app_meetme.c</span><br><span>index e7ade64..e37c548 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><div style="white-space:pre-wrap"></div><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18465">change 18465</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/+/18465"/><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: I817df6c26f5bda131678e56791b0b61ba64fc6f7 </div>
<div style="display:none"> Gerrit-Change-Number: 18465 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>