mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user