From: Adam Dickmeiss Date: Wed, 9 Sep 2009 12:03:57 +0000 (+0200) Subject: Fix handling of bad config X-Git-Tag: v1.2.0~9 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=5b4ea0cf66dd82c871ed7d69a5801d78789087b2;p=pazpar2-moved-to-github.git Fix handling of bad config --- diff --git a/src/pazpar2.c b/src/pazpar2.c index 56c18a5..56d2599 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -93,7 +93,7 @@ static int sc_main( int session_timeout = 60; const char *listener_override = 0; const char *proxy_override = 0; - struct conf_config *config; + struct conf_config *config = 0; #ifndef WIN32 if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) @@ -116,9 +116,9 @@ static int sc_main( daemon = 1; break; case 'f': - config = read_config(arg); + config = config_create(arg); if (!config) - exit(1); + return 1; sc_stop_config = config; break; case 'h':