aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-13 18:03:29 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-13 18:03:29 +0300
commit1085ddb9c09caba4bcb4408135044dc24f7798f3 (patch)
tree88a7073ef0b503557fb28e080a61224b60c18d5a /src/util.c
parent89f264624c1c846c995c22a8390b7e79f09ef960 (diff)
downloadrspamd-1085ddb9c09caba4bcb4408135044dc24f7798f3.tar.gz
rspamd-1085ddb9c09caba4bcb4408135044dc24f7798f3.zip
* Fix reload logic
* Create listen sock for lmtp in main processes dispatcher to allow multiply lmtp workers * Fix logic of logging
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c15
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);
}