[Asterisk-code-review] main/sounds: Use ast cli completion add. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Mon Mar 19 16:07:37 CDT 2018


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

Change subject: main/sounds: Use ast_cli_completion_add.
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/8583/1/main/sounds.c
File main/sounds.c:

https://gerrit.asterisk.org/#/c/8583/1/main/sounds.c@234
PS1, Line 234: 		struct ao2_container *sound_files = ast_media_get_media(sounds_index);
Should add the below check before getting sound_files and fixup the variable declarations:

if (a->pos != 3) {
  return NULL;
}

sound_files = ...

Actually with RAII_VAR removed we can move the variable declarations to the top of the function to eliminate the slightly awkward scoping.


https://gerrit.asterisk.org/#/c/8583/1/main/sounds.c@250
PS1, Line 250: 		ao2_iterator_destroy(&it_sounds);
             : 
             : 		return NULL;
You removed the RAII_VAR so now you need to cleanup sound_files here.



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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I140e1137906bbfcdb61c0c6304159be459ad873e
Gerrit-Change-Number: 8583
Gerrit-PatchSet: 1
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: Mon, 19 Mar 2018 21:07:37 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180319/e38def53/attachment-0001.html>


More information about the asterisk-code-review mailing list