From a1bc8231365c9bdea0d3881a8cd056f6abecb07b Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Fri, 22 Jun 2007 04:35:12 +0000 Subject: 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 --- pbx/pbx_spool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pbx/pbx_spool.c') 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; } -- cgit v1.2.3