<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7335">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">CLI: Remove compatibility code.<br><br>Previous commits maintained compatibility with older remote console<br>clients as well as maintaining all API's.<br><br>Remove the following compatibility code:<br>* ast_cli_generatornummatches.<br>* Remote command "_command nummatches".<br>* Sorting / duplicate removal by remote console.<br><br>Change-Id: I59e6ce94fa57ae564888442049695f7e46746437<br>---<br>M include/asterisk/cli.h<br>M main/asterisk.c<br>M main/cli.c<br>3 files changed, 1 insertion(+), 54 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/include/asterisk/cli.h b/include/asterisk/cli.h<br>index c75fc29..30c5dc7 100644<br>--- a/include/asterisk/cli.h<br>+++ b/include/asterisk/cli.h<br>@@ -293,8 +293,6 @@<br>  */<br> char *ast_cli_generator(const char *, const char *, int);<br> <br>-int ast_cli_generatornummatches(const char *, const char *);<br>-<br> /*!<br>  * \brief Generates a NULL-terminated array of strings that<br>  * 1) begin with the string in the second parameter, and<br>diff --git a/main/asterisk.c b/main/asterisk.c<br>index db80670..dd66867 100644<br>--- a/main/asterisk.c<br>+++ b/main/asterisk.c<br>@@ -3015,14 +3015,8 @@<br>                       break;<br>                }<br> <br>-         /* Older daemons sent duplicates. */<br>-         if (AST_VECTOR_GET_CMP(vec, retstr, strcasecmp)) {<br>-                   continue;<br>-            }<br>-<br>          retstr = ast_strdup(retstr);<br>-         /* Older daemons sent unsorted. */<br>-           if (!retstr || AST_VECTOR_ADD_SORTED(vec, retstr, strcasecmp)) {<br>+             if (!retstr || AST_VECTOR_APPEND(vec, retstr)) {<br>                      ast_free(retstr);<br>                     goto vector_cleanup;<br>          }<br>diff --git a/main/cli.c b/main/cli.c<br>index 0f023b2..75846b8 100644<br>--- a/main/cli.c<br>+++ b/main/cli.c<br>@@ -1336,33 +1336,6 @@<br> }<br> <br> <br>-<br>-static char *handle_commandnummatches(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)<br>-{<br>-        int matches = 0;<br>-<br>-  switch (cmd) {<br>-       case CLI_INIT:<br>-               e->command = "_command nummatches";<br>-             e->usage =<br>-                        "Usage: _command nummatches \"<line>\" text \n"<br>-                    "       This function is used internally to help with command completion and should.\n"<br>-                    "       never be called by the user directly.\n";<br>-          return NULL;<br>- case CLI_GENERATE:<br>-           return NULL;<br>- }<br>-<br>- if (a->argc != 4)<br>-         return CLI_SHOWUSAGE;<br>-<br>-     matches = ast_cli_generatornummatches(a->argv[2], a->argv[3]);<br>-<br>-      ast_cli(a->fd, "%d", matches);<br>-<br>-       return CLI_SUCCESS;<br>-}<br>-<br> struct channel_set_debug_args {<br>  int fd;<br>       int is_off;<br>@@ -1794,7 +1767,6 @@<br> static char *handle_help(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);<br> <br> static struct ast_cli_entry cli_cli[] = {<br>-      AST_CLI_DEFINE(handle_commandnummatches, "Returns number of command matches"),<br>      AST_CLI_DEFINE(handle_commandmatchesarray, "Returns command matches array"),<br> <br>     AST_CLI_DEFINE(handle_nodebugchan_deprecated, "Disable debugging on channel(s)"),<br>@@ -2470,23 +2442,6 @@<br>   *argc = x;<br>    *trailingwhitespace = whitespace;<br>     return duplicate;<br>-}<br>-<br>-/*! \brief Return the number of unique matches for the generator */<br>-int ast_cli_generatornummatches(const char *text, const char *word)<br>-{<br>-     int matches;<br>- struct ast_vector_string *vec = ast_cli_completion_vector(text, word);<br>-<br>-    if (!vec) {<br>-          return 0;<br>-    }<br>-<br>- matches = AST_VECTOR_SIZE(vec) - 1;<br>-  AST_VECTOR_CALLBACK_VOID(vec, ast_free);<br>-     AST_VECTOR_PTR_FREE(vec);<br>-<br>- return matches;<br> }<br> <br> char **ast_cli_completion_matches(const char *text, const char *word)<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7335">change 7335</a>. To unsubscribe, 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/7335"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I59e6ce94fa57ae564888442049695f7e46746437 </div>
<div style="display:none"> Gerrit-Change-Number: 7335 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>