From d3c241b7a3fd20d80f31aaeeb7a941507f53c4c9 Mon Sep 17 00:00:00 2001 From: Olaf Rempel Date: Sun, 3 May 2009 14:05:09 +0200 Subject: [PATCH] fix logfile handling on restart --- sammler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sammler.c b/sammler.c index 84626e3..dcb1434 100644 --- a/sammler.c +++ b/sammler.c @@ -90,7 +90,7 @@ int main(int argc, char *argv[]) /* check logfile */ const char *logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE); - if (logfile != NULL && debug == 0) { + if (!debug) { /* check pidfile */ const char *pidfile = config_get_string("global", "pidfile", DEFAULT_PIDFILE); if (pidfile_check(pidfile, 1) != 0) { @@ -145,7 +145,7 @@ int main(int argc, char *argv[]) break; logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE); - if (log_init(logfile) < 0) + if (!debug && log_init(logfile) < 0) break; log_print(LOG_EVERYTIME, "sammler restarted (pid:%d) ", getpid());