From 109d8786f2274471f2b5a5c5548fc8aded32504c Mon Sep 17 00:00:00 2001 From: venaas Date: Tue, 10 Jun 2008 11:43:51 +0000 Subject: fixed bug when no logdestination specified, and not with -f git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@290 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- radsecproxy.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/radsecproxy.c b/radsecproxy.c index b29ce28..638e413 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -3717,15 +3717,9 @@ int main(int argc, char **argv) { options.loglevel = loglevel; else if (options.loglevel) debug_set_level(options.loglevel); - if (foreground) { - free(options.logdestination); - options.logdestination = NULL; - } else { - if (!options.logdestination) - options.logdestination = "x-syslog:///"; - debug_set_destination(options.logdestination); - free(options.logdestination); - } + if (!foreground) + debug_set_destination(options.logdestination ? options.logdestination : "x-syslog:///"); + free(options.logdestination); if (!list_first(clconfs)) debugx(1, DBG_ERR, "No clients configured, nothing to do, exiting"); -- cgit v1.2.3