[Asterisk-code-review] res_musiconhold: Performance improvement of bug fix (asterisk[16])
Nicholas John Koch
asteriskteam at digium.com
Thu May 14 05:01:39 CDT 2020
Nicholas John Koch has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/14409 )
Change subject: res_musiconhold: Performance improvement of bug fix
......................................................................
res_musiconhold: Performance improvement of bug fix
ASTERISK-28892
Reported-By: Nicholas John Koch
Change-Id: I91e37023b1c578a3fb307acb476204599a25f31f
---
M res/res_musiconhold.c
1 file changed, 3 insertions(+), 5 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/09/14409/1
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index c2eb1ac..01a14b9 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -1091,11 +1091,9 @@
if (ast_begins_with(dup, "/")) {
char *last_pos_dot = strrchr(dup, '.');
char *last_pos_slash = strrchr(dup, '/');
- if (last_pos_dot != NULL) {
- if ((int)(last_pos_dot - dup) > (int)(last_pos_slash - dup)) {
- ast_log(LOG_WARNING, "The playlist entry '%s' may include an extension, which could prevent it from playing.\n",
- dup);
- }
+ if (last_pos_dot && last_pos_dot > last_pos_slash) {
+ ast_log(LOG_WARNING, "The playlist entry '%s' may include an extension, which could prevent it from playing.\n",
+ dup);
}
}
AST_VECTOR_APPEND(&mohclass->files, dup);
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14409
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I91e37023b1c578a3fb307acb476204599a25f31f
Gerrit-Change-Number: 14409
Gerrit-PatchSet: 1
Gerrit-Owner: Nicholas John Koch <koch at njk-it.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200514/283c3c17/attachment.html>
More information about the asterisk-code-review
mailing list