aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-05 01:02:58 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-05 01:02:58 +0000
commit79710bc4217a1655ebb737688944bd4f13c23a6e (patch)
tree9331c3a2521b1614ab908609b66042b8990943dc /res
parent89bf4bca17c2a3f20862f3a124277e3561714ff8 (diff)
Fix not being able to specify a URL in MOH class directory.
Don't attempt to chdir on a URL! (closes issue #16875) Reported by: raarts Patches: moh-http.patch uploaded by raarts (license 937) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@250786 f38db490-d61c-443f-a65b-d21fe96a405b
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 630a6db58..012b8a6df 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -457,7 +457,7 @@ static int spawn_mp3(struct mohclass *class)
#ifdef HAVE_CAP
cap_t cap;
#endif
- 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);
}