<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/8532">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve; Approved for Submit
Kevin Harwell: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">main/channel: Use ast_cli_completion_add for channeltypes.<br><br>Change-Id: Ia845fae6a84801cc7d9996767b99efb2753cbb48<br>---<br>M main/channel.c<br>1 file changed, 5 insertions(+), 7 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/channel.c b/main/channel.c<br>index 70e0bff..72e7d4a 100644<br>--- a/main/channel.c<br>+++ b/main/channel.c<br>@@ -314,25 +314,23 @@<br> static char *complete_channeltypes(struct ast_cli_args *a)<br> {<br> struct chanlist *cl;<br>- int which = 0;<br> int wordlen;<br>- char *ret = NULL;<br> <br>- if (a->pos != 3)<br>+ if (a->pos != 3) {<br> return NULL;<br>+ }<br> <br> wordlen = strlen(a->word);<br> <br> AST_RWLIST_RDLOCK(&backends);<br> AST_RWLIST_TRAVERSE(&backends, cl, list) {<br>- if (!strncasecmp(a->word, cl->tech->type, wordlen) && ++which > a->n) {<br>- ret = ast_strdup(cl->tech->type);<br>- break;<br>+ if (!strncasecmp(a->word, cl->tech->type, wordlen)) {<br>+ ast_cli_completion_add(ast_strdup(cl->tech->type));<br> }<br> }<br> AST_RWLIST_UNLOCK(&backends);<br> <br>- return ret;<br>+ return NULL;<br> }<br> <br> /*! \brief Show details about a channel driver - CLI command */<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8532">change 8532</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/8532"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ia845fae6a84801cc7d9996767b99efb2753cbb48 </div>
<div style="display:none"> Gerrit-Change-Number: 8532 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: 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: Kevin Harwell <kharwell@digium.com> </div>