<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11275">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pbx.c: Ignore dashes in extensions when using extenpatternmatchnew<br><br>Because hyphens are not matched literally in Asterisk dialplan, we need<br>to ignore them in our candidate extensions as well.<br><br>ASTERISK-17695 #close<br>Reported by: test011<br><br>Change-Id: I227f02301577b1633e8a55b9fe9dc149935c03f0<br>---<br>M main/pbx.c<br>1 file changed, 9 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/75/11275/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/pbx.c b/main/pbx.c</span><br><span>index b4a5448..b374b76 100644</span><br><span>--- a/main/pbx.c</span><br><span>+++ b/main/pbx.c</span><br><span>@@ -1187,6 +1187,15 @@</span><br><span> {</span><br><span>    struct match_char *p; /* note minimal stack storage requirements */</span><br><span>  struct ast_exten pattern = { .label = label };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* When creating the trie, if we encounter any bare hyphens (ones that are not inside</span><br><span style="color: hsl(120, 100%, 40%);">+  * brackets) we do _not_ insert them because we consider them "eye candy." So when we</span><br><span style="color: hsl(120, 100%, 40%);">+        * are searching for them, we need to ensure that our subject extension doesn't have</span><br><span style="color: hsl(120, 100%, 40%);">+       * any hyphens either */</span><br><span style="color: hsl(120, 100%, 40%);">+      while (*str == '-') {</span><br><span style="color: hsl(120, 100%, 40%);">+         str++;</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> #ifdef DEBUG_THIS</span><br><span>     if (tree)</span><br><span>            ast_log(LOG_NOTICE,"new_find_extension called with %s on (sub)tree %s action=%s\n", str, tree->x, action2str(action));</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11275">change 11275</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/+/11275"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I227f02301577b1633e8a55b9fe9dc149935c03f0 </div>
<div style="display:none"> Gerrit-Change-Number: 11275 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>