From 74c119dd1b066329eba59d057935ba7ec7249555 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 15 Jan 2006 16:42:20 +0100 Subject: Better DIE implementation, added SO_REUSEADDR to listening socket. --- conf.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'conf.c') diff --git a/conf.c b/conf.c index 6ec20015..dd165869 100644 --- a/conf.c +++ b/conf.c @@ -91,15 +91,15 @@ conf_t *conf_load( int argc, char *argv[] ) conf->port = i; } else if( opt == 'n' ) - conf->nofork=1; + conf->nofork = 1; else if( opt == 'v' ) - conf->verbose=1; + conf->verbose = 1; else if( opt == 'I' ) - conf->runmode=RUNMODE_INETD; + conf->runmode = RUNMODE_INETD; else if( opt == 'D' ) - conf->runmode=RUNMODE_DAEMON; + conf->runmode = RUNMODE_DAEMON; else if( opt == 'F' ) - conf->runmode=RUNMODE_FORKDAEMON; + conf->runmode = RUNMODE_FORKDAEMON; else if( opt == 'c' ) { if( strcmp( CONF_FILE, optarg ) != 0 ) @@ -107,6 +107,8 @@ conf_t *conf_load( int argc, char *argv[] ) g_free( CONF_FILE ); CONF_FILE = g_strdup( optarg ); g_free( conf ); + /* Re-evaluate arguments. */ + optind = 1; return( conf_load( argc, argv ) ); } } -- cgit v1.2.3