From 6d5709de3887635e6175e2f5e53f58f3722c756a Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 2 Mar 2010 21:57:03 +0100 Subject: [PATCH] main: separate loading of config and setup_logging at startup This is the first part of a fix for bug #74 (making reloading of config work if running as non-privileged user) Michael --- src/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index faa52ba..22229b2 100644 --- a/src/main.c +++ b/src/main.c @@ -367,7 +367,14 @@ main (int argc, char **argv) log_message (LOG_INFO, "Initializing " PACKAGE " ..."); - ret = reload_config (); + ret = reload_config_file (config_defaults.config_file, + &config, + &config_defaults); + if (ret != 0) { + exit (EX_SOFTWARE); + } + + ret = setup_logging (); if (ret != 0) { exit (EX_SOFTWARE); }