diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2007-11-05 22:59:49 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2007-11-05 22:59:49 +0000 | 
| commit | 22313024f80f7325a7253c64fe49cc6458df7dd4 (patch) | |
| tree | e69df7f5f460cfe0163a54543f2c96eb36b6634c /conf.c | |
| parent | 5e2615a2d8a5ae64161727f8a32f6f0949f3fee4 (diff) | |
| parent | 7435ccf486eee2f60d6a8b2ab0029b8f4ce17ab7 (diff) | |
Merging from Jelmer.
Diffstat (limited to 'conf.c')
| -rw-r--r-- | conf.c | 23 | 
1 files changed, 5 insertions, 18 deletions
| @@ -46,12 +46,8 @@ conf_t *conf_load( int argc, char *argv[] )  	conf = g_new0( conf_t, 1 ); -#ifdef IPV6 -	conf->iface = "::"; -#else -	conf->iface = "0.0.0.0"; -#endif -	conf->port = 6667; +	conf->iface = NULL; +	conf->port = "6667";  	conf->nofork = 0;  	conf->verbose = 0;  	conf->primary_storage = "xml"; @@ -88,12 +84,8 @@ conf_t *conf_load( int argc, char *argv[] )  		}  		else if( opt == 'p' )  		{ -			if( ( sscanf( optarg, "%d", &i ) != 1 ) || ( i <= 0 ) || ( i > 65535 ) ) -			{ -				fprintf( stderr, "Invalid port number: %s\n", optarg ); -				return( NULL ); -			} -			conf->port = i; +			g_free( conf->port ); +			conf->port = g_strdup( optarg );  		}  		else if( opt == 'P' )  		{ @@ -203,12 +195,7 @@ static int conf_loadini( conf_t *conf, char *file )  			}  			else if( g_strcasecmp( ini->key, "daemonport" ) == 0 )  			{ -				if( ( sscanf( ini->value, "%d", &i ) != 1 ) || ( i <= 0 ) || ( i > 65535 ) ) -				{ -					fprintf( stderr, "Invalid port number: %s\n", ini->value ); -					return( 0 ); -				} -				conf->port = i; +				conf->port = g_strdup( ini->value );  			}  			else if( g_strcasecmp( ini->key, "authmode" ) == 0 )  			{ | 
