aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_musiconhold.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 82e053478..676b0184a 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -560,7 +560,7 @@ static int spawn_mp3(struct mohclass *class)
ast_close_fds_above_n(STDERR_FILENO);
/* Child */
- if (strcasecmp(class->dir, "nodir") && chdir(class->dir) < 0) {
+ if (strncasecmp(class->dir, "http://", 7) && strcasecmp(class->dir, "nodir") && chdir(class->dir) < 0) {
ast_log(LOG_WARNING, "chdir() failed: %s\n", strerror(errno));
_exit(1);
}