<p>Joshua Colp <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15639">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, but someone else must approve
George Joseph: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_queue.c: Don't crash when realtime queue name is empty.<br><br>ASTERISK-27542 #close<br><br>Change-Id: If0b9719380a25533d2aed1053cff845dc3a4854a<br>---<br>M apps/app_queue.c<br>1 file changed, 8 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_queue.c b/apps/app_queue.c</span><br><span>index 334f41d..93bbdaa 100644</span><br><span>--- a/apps/app_queue.c</span><br><span>+++ b/apps/app_queue.c</span><br><span>@@ -7704,6 +7704,10 @@</span><br><span> char *category = NULL;</span><br><span> while ((category = ast_category_browse(queue_config, category))) {</span><br><span> const char *name = ast_variable_retrieve(queue_config, category, "name");</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_strlen_zero(name)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_WARNING, "Ignoring realtime queue with a NULL or empty 'name.'\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ continue;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> if ((q = find_load_queue_rt_friendly(name))) {</span><br><span> foundqueue++;</span><br><span> foundinterface += set_member_value_help_members(q, interface, property, value);</span><br><span>@@ -9788,6 +9792,10 @@</span><br><span> char *category = NULL;</span><br><span> while ((category = ast_category_browse(cfg, category))) {</span><br><span> const char *queuename = ast_variable_retrieve(cfg, category, "name");</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_strlen_zero(queuename)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_WARNING, "Ignoring realtime queue with a NULL or empty 'name.'\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ continue;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> if ((q = find_load_queue_rt_friendly(queuename))) {</span><br><span> queue_t_unref(q, "Done with temporary pointer");</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15639">change 15639</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/+/15639"/><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: If0b9719380a25533d2aed1053cff845dc3a4854a </div>
<div style="display:none"> Gerrit-Change-Number: 15639 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.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: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>