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
This commit is contained in:
Tilghman Lesher
2007-06-22 04:35:12 +00:00
parent 0b98b2a659
commit a1bc823136
11 changed files with 80 additions and 80 deletions

View File

@@ -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;
}