<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/8543">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve
Kevin Harwell: 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;">main/cdr: Use ast_cli_completion_add for CDR channel completion.<br><br>Change-Id: Ie81830647a23aad61c1162583b6d50adbe6e7822<br>---<br>M main/cdr.c<br>1 file changed, 4 insertions(+), 7 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/cdr.c b/main/cdr.c<br>index 3e02c3e..496fb36 100644<br>--- a/main/cdr.c<br>+++ b/main/cdr.c<br>@@ -3920,18 +3920,14 @@<br> /*! \brief Complete user input for 'cdr show' */<br> static char *cli_complete_show(struct ast_cli_args *a)<br> {<br>- char *result = NULL;<br> int wordlen = strlen(a->word);<br>- int which = 0;<br> struct ao2_iterator it_cdrs;<br> struct cdr_object *cdr;<br> <br> it_cdrs = ao2_iterator_init(active_cdrs_master, 0);<br> while ((cdr = ao2_iterator_next(&it_cdrs))) {<br>- if (!strncasecmp(a->word, cdr->party_a.snapshot->name, wordlen) &&<br>- (++which > a->n)) {<br>- result = ast_strdup(cdr->party_a.snapshot->name);<br>- if (result) {<br>+ if (!strncasecmp(a->word, cdr->party_a.snapshot->name, wordlen)) {<br>+ if (ast_cli_completion_add(ast_strdup(cdr->party_a.snapshot->name))) {<br> ao2_ref(cdr, -1);<br> break;<br> }<br>@@ -3939,7 +3935,8 @@<br> ao2_ref(cdr, -1);<br> }<br> ao2_iterator_destroy(&it_cdrs);<br>- return result;<br>+<br>+ return NULL;<br> }<br> <br> static void cli_show_channels(struct ast_cli_args *a)<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8543">change 8543</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/8543"/><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: Ie81830647a23aad61c1162583b6d50adbe6e7822 </div>
<div style="display:none"> Gerrit-Change-Number: 8543 </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: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>