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 /main/logger.c | |
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 'main/logger.c')
-rw-r--r-- | main/logger.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/main/logger.c b/main/logger.c index c64b634f4..f02a18e50 100644 --- a/main/logger.c +++ b/main/logger.c @@ -417,7 +417,7 @@ int reload_logger(int rotate) queue_rotate = 0; qlog = NULL; - mkdir(ast_config_AST_LOG_DIR, 0755); + ast_mkdir(ast_config_AST_LOG_DIR, 0777); AST_LIST_TRAVERSE(&logchannels, f, list) { if (f->disabled) { @@ -796,14 +796,13 @@ int init_logger(void) /* register the logger cli commands */ ast_cli_register_multiple(cli_logger, sizeof(cli_logger) / sizeof(struct ast_cli_entry)); - mkdir(ast_config_AST_LOG_DIR, 0755); + ast_mkdir(ast_config_AST_LOG_DIR, 0777); /* create log channels */ init_logger_chain(); /* create the eventlog */ if (logfiles.event_log) { - mkdir(ast_config_AST_LOG_DIR, 0755); snprintf(tmp, sizeof(tmp), "%s/%s", ast_config_AST_LOG_DIR, EVENTLOG); eventlog = fopen(tmp, "a"); if (eventlog) { |