- Timestamp:
- 2007-11-05T22:59:49Z (17 years ago)
- Branches:
- master
- Children:
- be68d99
- Parents:
- 5e2615a (diff), 7435ccf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
conf.c
r5e2615a r2231302 47 47 conf = g_new0( conf_t, 1 ); 48 48 49 #ifdef IPV6 50 conf->iface = "::"; 51 #else 52 conf->iface = "0.0.0.0"; 53 #endif 54 conf->port = 6667; 49 conf->iface = NULL; 50 conf->port = "6667"; 55 51 conf->nofork = 0; 56 52 conf->verbose = 0; … … 89 85 else if( opt == 'p' ) 90 86 { 91 if( ( sscanf( optarg, "%d", &i ) != 1 ) || ( i <= 0 ) || ( i > 65535 ) ) 92 { 93 fprintf( stderr, "Invalid port number: %s\n", optarg ); 94 return( NULL ); 95 } 96 conf->port = i; 87 g_free( conf->port ); 88 conf->port = g_strdup( optarg ); 97 89 } 98 90 else if( opt == 'P' ) … … 204 196 else if( g_strcasecmp( ini->key, "daemonport" ) == 0 ) 205 197 { 206 if( ( sscanf( ini->value, "%d", &i ) != 1 ) || ( i <= 0 ) || ( i > 65535 ) ) 207 { 208 fprintf( stderr, "Invalid port number: %s\n", ini->value ); 209 return( 0 ); 210 } 211 conf->port = i; 198 conf->port = g_strdup( ini->value ); 212 199 } 213 200 else if( g_strcasecmp( ini->key, "authmode" ) == 0 )
Note: See TracChangeset
for help on using the changeset viewer.