mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-27 14:41:58 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@250786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -457,7 +457,7 @@ static int spawn_mp3(struct mohclass *class)
|
|||||||
#ifdef HAVE_CAP
|
#ifdef HAVE_CAP
|
||||||
cap_t cap;
|
cap_t cap;
|
||||||
#endif
|
#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));
|
ast_log(LOG_WARNING, "chdir() failed: %s\n", strerror(errno));
|
||||||
_exit(1);
|
_exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user