summaryrefslogtreecommitdiff
path: root/pbx/pbx_spool.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2007-06-22 04:35:12 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2007-06-22 04:35:12 +0000
commita1bc8231365c9bdea0d3881a8cd056f6abecb07b (patch)
tree45f02eef0ac120e193459b71f73a7b62b7db8784 /pbx/pbx_spool.c
parent0b98b2a659dca13c8b7fe4a6682ede8e2ae110b7 (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: https://origsvn.digium.com/svn/asterisk/trunk@71040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx/pbx_spool.c')
-rw-r--r--pbx/pbx_spool.c4
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;
}