diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-22 04:35:12 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-22 04:35:12 +0000 |
commit | ed2b193e6c6d0cce882796969369e305075103e0 (patch) | |
tree | 45f02eef0ac120e193459b71f73a7b62b7db8784 /pbx | |
parent | de3fbdf9699a307db497cd68d3d9d044936d7b4f (diff) |
Issue 9990 - New API ast_mkdir, which creates parent directories as necessary (and is faster than an outcall to mkdir -p)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71040 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/pbx_spool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index aaefef56d..2888efaeb 100644 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -294,7 +294,7 @@ static int remove_from_queue(struct outgoing *o, const char *status) unlink(o->fn); return 0; } - if (mkdir(qdonedir, 0700) && (errno != EEXIST)) { + if (ast_mkdir(qdonedir, 0777)) { ast_log(LOG_WARNING, "Unable to create queue directory %s -- outgoing spool archiving disabled\n", qdonedir); unlink(o->fn); return -1; @@ -485,7 +485,7 @@ static int load_module(void) pthread_t thread; int ret; snprintf(qdir, sizeof(qdir), "%s/%s", ast_config_AST_SPOOL_DIR, "outgoing"); - if (mkdir(qdir, 0700) && (errno != EEXIST)) { + if (ast_mkdir(qdir, 0777)) { ast_log(LOG_WARNING, "Unable to create queue directory %s -- outgoing spool disabled\n", qdir); return 0; } |