[Asterisk-code-review] res_musiconhold: Add support of various URL-schemes by MoH. (asterisk[16])
Friendly Automation
asteriskteam at digium.com
Wed Jan 27 09:59:36 CST 2021
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/15371 )
Change subject: res_musiconhold: Add support of various URL-schemes by MoH.
......................................................................
res_musiconhold: Add support of various URL-schemes by MoH.
Provided a support of variuos URL-schemes for res_musiconhold,
registered by ast_bucket_scheme_register().
ASTERISK-29262 #close
Change-Id: If0ea8697587353dce358a70035d82649fd4632b6
---
M res/res_musiconhold.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Sean Bright: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 8ac3b92..736ddc6 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -1118,7 +1118,7 @@
} else if (!strcasecmp(var->name, "mode")) {
ast_copy_string(mohclass->mode, var->value, sizeof(mohclass->mode));
} else if (!strcasecmp(var->name, "entry")) {
- if (ast_begins_with(var->value, "/") || ast_begins_with(var->value, "http://") || ast_begins_with(var->value, "https://")) {
+ if (ast_begins_with(var->value, "/") || strstr(var->value, "://")) {
char *dup;
if (!playlist_entries) {
@@ -1144,7 +1144,7 @@
AST_VECTOR_APPEND(playlist_entries, dup);
} else {
- ast_log(LOG_ERROR, "Playlist entries must be an HTTP(S) URL or absolute path, '%s' provided.\n", var->value);
+ ast_log(LOG_ERROR, "Playlist entries must be a URL or an absolute path, '%s' provided.\n", var->value);
}
} else if (!strcasecmp(var->name, "directory")) {
ast_copy_string(mohclass->dir, var->value, sizeof(mohclass->dir));
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15371
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: If0ea8697587353dce358a70035d82649fd4632b6
Gerrit-Change-Number: 15371
Gerrit-PatchSet: 1
Gerrit-Owner: Boris P. Korzun <drtr0jan at yandex.ru>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210127/f29950e7/attachment.html>
More information about the asterisk-code-review
mailing list