<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18074">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ami: Improve substring parsing for disabled events.<br><br>ASTERISK-29853 added the ability to selectively disable<br>AMI events on a global basis, but the logic for this uses<br>strstr which means that events with names which are the prefix<br>of another event, if disabled, could disable those events as<br>well.<br><br>Instead, we account for this possibility to prevent this<br>undesired behavior from occuring.<br><br>ASTERISK_29853<br><br>Change-Id: Icccd1872602889806740971e4adf932f92466959<br>---<br>M main/manager.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/74/18074/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/manager.c b/main/manager.c</span><br><span>index f6feb8e..76a6611 100644</span><br><span>--- a/main/manager.c</span><br><span>+++ b/main/manager.c</span><br><span>@@ -7234,7 +7234,7 @@</span><br><span> int res;</span><br><span> </span><br><span> if (!ast_strlen_zero(manager_disabledevents)) {</span><br><span style="color: hsl(0, 100%, 40%);">- if (strstr(manager_disabledevents, event)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_in_delimited_string(event, manager_disabledevents, ',')) {</span><br><span> ast_debug(3, "AMI Event '%s' is globally disabled, skipping\n", event);</span><br><span> /* Event is globally disabled */</span><br><span> ao2_cleanup(sessions);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18074">change 18074</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/+/18074"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Icccd1872602889806740971e4adf932f92466959 </div>
<div style="display:none"> Gerrit-Change-Number: 18074 </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>