From 180c0664aa2af528745f997df0fbeadb2c87bcff Mon Sep 17 00:00:00 2001 From: rofl0r Date: Wed, 15 Jan 2020 15:26:40 +0000 Subject: remove godaemon member from config structure since this option can't be set via config file, it makes sense to factor it out and use it only where strictly needed, e.g. in startup code. --- src/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index aac9a5b..8b2167d 100644 --- a/src/main.c +++ b/src/main.c @@ -263,7 +263,7 @@ done: int main (int argc, char **argv) { - int opt; + int opt, daemonized = TRUE; srand(time(NULL)); /* for hashmap seeds */ @@ -287,7 +287,7 @@ main (int argc, char **argv) exit (EX_OK); case 'd': - (&config_defaults)->godaemon = FALSE; + daemonized = FALSE; break; case 'c': @@ -330,7 +330,7 @@ main (int argc, char **argv) anonymous_insert ("Content-Type"); } - if (config.godaemon == TRUE) { + if (daemonized == TRUE) { if (!config.syslog && config.logf_name == NULL) fprintf(stderr, "WARNING: logging deactivated " "(can't log to stdout when daemonized)\n"); -- cgit v1.2.3