summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-12-16 14:31:02 +0000
committerRussell Bryant <russell@russellbryant.com>2008-12-16 14:31:02 +0000
commit1f40479382375010e9e3828b1e2c73972af9f18d (patch)
tree09b94eaea4986bab9cc9ea697592d5da8d80060f /res
parentf546396c0fea56b50b88218e52cf4e0f5ef11a4c (diff)
Merged revisions 164605 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r164605 | russell | 2008-12-16 08:28:10 -0600 (Tue, 16 Dec 2008) | 5 lines Don't try to change working directory if a directory was not configured. (closes issue #14089) Reported by: caspy ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 bebc08a4e..091a6a5b8 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -512,7 +512,7 @@ static int spawn_mp3(struct mohclass *class)
ast_close_fds_above_n(STDERR_FILENO);
/* 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);
}