[Asterisk-code-review] CLI: Simplify composite completion generators. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Fri Dec 15 16:58:18 CST 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/7560 )

Change subject: CLI: Simplify composite completion generators.
......................................................................


Patch Set 2: Code-Review-1

(6 comments)

https://gerrit.asterisk.org/#/c/7560/2/channels/chan_iax2.c
File channels/chan_iax2.c:

https://gerrit.asterisk.org/#/c/7560/2/channels/chan_iax2.c@3674
PS2, Line 3674: 			ast_cli_complete(a->word, choices, -1);
              : 			return complete_iax2_peers(a->line, a->word, a->pos, a->n, IAX_RTCACHEFRIENDS);
I think this is going to add "all" to the vector for every matching peer IAX2 has.  If you also make complete_iax2_peers() work similarly or always do ast_cli_completion_add() you wouldn't have the duplication of "all".


https://gerrit.asterisk.org/#/c/7560/2/channels/chan_sip.c
File channels/chan_sip.c:

https://gerrit.asterisk.org/#/c/7560/2/channels/chan_sip.c@20486
PS2, Line 20486: 			return complete_sip_peer(a->word, a->n, SIP_PAGE2_RTCACHEFRIENDS);
same about duplicating matching choices.


https://gerrit.asterisk.org/#/c/7560/2/channels/chan_skinny.c
File channels/chan_skinny.c:

https://gerrit.asterisk.org/#/c/7560/2/channels/chan_skinny.c@3930
PS2, Line 3930: 		return complete_skinny_devices(word, state);
same


https://gerrit.asterisk.org/#/c/7560/2/include/asterisk/cli.h
File include/asterisk/cli.h:

https://gerrit.asterisk.org/#/c/7560/2/include/asterisk/cli.h@206
PS2, Line 206:  * matching channels are added with ast_cli_completion_add.
s/channels/choices/


https://gerrit.asterisk.org/#/c/7560/2/main/bridge.c
File main/bridge.c:

https://gerrit.asterisk.org/#/c/7560/2/main/bridge.c@5217
PS2, Line 5217: 			return complete_bridge_participant(a->argv[2], a->line, a->word, a->pos, a->n);
same


https://gerrit.asterisk.org/#/c/7560/2/main/cli.c
File main/cli.c:

https://gerrit.asterisk.org/#/c/7560/2/main/cli.c@1511
PS2, Line 1511: 		ast_complete_channels(a->line, a->word, a->pos, a->n, -1);
Changed wrong parameter.

s/a->n, -1/-1, 3/



-- 
To view, visit https://gerrit.asterisk.org/7560
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Iebef61424689569338d0916ff2e37df944ac76fa
Gerrit-Change-Number: 7560
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 15 Dec 2017 22:58:18 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171215/da01ed65/attachment.html>


More information about the asterisk-code-review mailing list