diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-16 14:28:10 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-16 14:28:10 +0000 |
commit | 7156f4cb8e6b9742e34b07d1dead0b34deb3022f (patch) | |
tree | f68b9f6c2017c6e83700237c1fd88271dc3494c1 /res/res_musiconhold.c | |
parent | 3391dcfaa120eaa3dbf54054d73c62f396ebae40 (diff) |
Don't try to change working directory if a directory was not configured.
(closes issue #14089)
Reported by: caspy
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164605 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r-- | res/res_musiconhold.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 80976a404..6b6c115e0 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -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); } |