[Asterisk-code-review] res_musiconhold: Add support of various URL-schemes by MoH. (asterisk[master])

Boris P. Korzun asteriskteam at digium.com
Sat Jan 23 07:19:07 CST 2021


Boris P. Korzun has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15381 )


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, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/81/15381/1

diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 8ac3b92..e7c82c3 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, "://") != NULL) {
 				char *dup;
 
 				if (!playlist_entries) {

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15381
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: If0ea8697587353dce358a70035d82649fd4632b6
Gerrit-Change-Number: 15381
Gerrit-PatchSet: 1
Gerrit-Owner: Boris P. Korzun <drtr0jan at yandex.ru>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210123/3b96c6dc/attachment.html>


More information about the asterisk-code-review mailing list