[Asterisk-code-review] res musiconhold: Remove 'special' MP3 modes (asterisk[master])
Sean Bright
asteriskteam at digium.com
Fri Jul 14 14:26:17 CDT 2017
Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/5995 )
Change subject: res_musiconhold: Remove 'special' MP3 modes
......................................................................
Patch Set 1:
(1 comment)
https://gerrit.asterisk.org/#/c/5995/1/res/res_musiconhold.c
File res/res_musiconhold.c:
https://gerrit.asterisk.org/#/c/5995/1/res/res_musiconhold.c@575
PS1, Line 575: struct dirent *de;
: DIR *dir = opendir(class->dir);
:
: if (!dir) {
: ast_log(LOG_WARNING, "Cannot access '%s': %s\n", class->dir, strerror(errno));
: return -1;
: }
:
: while ((de = readdir(dir)) && (files < MAX_FILE_COUNT)) {
: if (strlen(de->d_name) > 3 &&
: (ast_ends_with(de->d_name, ".raw") ||
: ast_ends_with(de->d_name, ".sln") ||
: ast_ends_with(de->d_name, ".mp3"))) {
> > In moh_scan_files we are still using opendir/readdir/closedir.
>
> Since the code here was already changing it seemed like an easy
> thing to do to improve the code. That being said the code has
> worked that way for a long time without complaints (that I know
> of), so I'll leave to your discretion. Certainly nothing that needs
> to hold up the review.
If/when this is merged. I will submit another patch to update both raw opendir calls.
--
To view, visit https://gerrit.asterisk.org/5995
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I865fbee781c36f9cf9f6b5076f95f60b34fa7d64
Gerrit-Change-Number: 5995
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Fri, 14 Jul 2017 19:26:17 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170714/c65303d0/attachment.html>
More information about the asterisk-code-review
mailing list