diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/util.c b/src/util.c index a60bafea6..62d656140 100644 --- a/src/util.c +++ b/src/util.c @@ -825,14 +825,13 @@ open_log (struct config_file *cfg) } } -int -reopen_log (struct config_file *cfg) +void +close_log (struct config_file *cfg) { - do_reopen_log = 0; switch (cfg->log_type) { case RSPAMD_LOG_CONSOLE: /* Do nothing with console */ - return 0; + break; case RSPAMD_LOG_SYSLOG: closelog (); break; @@ -840,6 +839,14 @@ reopen_log (struct config_file *cfg) close (cfg->log_fd); break; } + +} + +int +reopen_log (struct config_file *cfg) +{ + do_reopen_log = 0; + close_log (cfg); return open_log (cfg); } |