aboutsummaryrefslogtreecommitdiffstats
path: root/main/logger.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-19 16:03:33 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-19 16:03:33 +0000
commitf04a8183d8b3f0104cf7dd954ef40663cf4516bc (patch)
tree94ef0fa32b86c679d8c9f059bd879fb86b18cd20 /main/logger.c
parentb8fa11992d53664ad30112c3a834be237675dec3 (diff)
The logger closes the files it is logging to when reloading so we have to read in the logger configuration even if it has not changed so that the logs get opened again.
(closes issue #12665) Reported by: DennisD git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117085 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/logger.c')
-rw-r--r--main/logger.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/logger.c b/main/logger.c
index 74fdda5df..cc062d968 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -317,15 +317,15 @@ static struct logchannel *make_logchannel(const char *channel, const char *compo
return chan;
}
-static void init_logger_chain(int reload, int locked)
+static void init_logger_chain(int locked)
{
struct logchannel *chan;
struct ast_config *cfg;
struct ast_variable *var;
const char *s;
- struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
+ struct ast_flags config_flags = { 0 };
- if ((cfg = ast_config_load2("logger.conf", "logger", config_flags)) == CONFIG_STATUS_FILEUNCHANGED)
+ if (!(cfg = ast_config_load2("logger.conf", "logger", config_flags)))
return;
/* delete our list of log channels */
@@ -641,7 +641,7 @@ static int reload_logger(int rotate)
filesize_reload_needed = 0;
- init_logger_chain(rotate ? 0 : 1 /* reload */, 1 /* locked */);
+ init_logger_chain(1 /* locked */);
if (logfiles.event_log) {
snprintf(old, sizeof(old), "%s/%s", ast_config_AST_LOG_DIR, EVENTLOG);
@@ -976,7 +976,7 @@ int init_logger(void)
ast_mkdir(ast_config_AST_LOG_DIR, 0777);
/* create log channels */
- init_logger_chain(0 /* reload */, 0 /* locked */);
+ init_logger_chain(0 /* locked */);
/* create the eventlog */
if (logfiles.event_log) {