aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-16 14:28:10 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-16 14:28:10 +0000
commit7156f4cb8e6b9742e34b07d1dead0b34deb3022f (patch)
treef68b9f6c2017c6e83700237c1fd88271dc3494c1 /res
parent3391dcfaa120eaa3dbf54054d73c62f396ebae40 (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')
-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 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);
}