]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't try to change working directory if a directory was not configured.
authorRussell Bryant <russell@russellbryant.com>
Tue, 16 Dec 2008 14:28:10 +0000 (14:28 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 16 Dec 2008 14:28:10 +0000 (14:28 +0000)
(closes issue #14089)
Reported by: caspy

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164605 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_musiconhold.c

index 80976a404c18fe1d2028056e96eb0985b9a6653d..6b6c115e0b5afb45652f91062fd85e6173128fe1 100644 (file)
@@ -481,7 +481,7 @@ static int spawn_mp3(struct mohclass *class)
                        }
                }
                /* Child */
-               if (chdir(class->dir) < 0) {
+               if (strcasecmp(class->dir, "nodir") && chdir(class->dir) < 0) {
                        ast_log(LOG_WARNING, "chdir() failed: %s\n", strerror(errno));
                        _exit(1);
                }