- Timestamp:
- 2008-08-11T23:07:12Z (16 years ago)
- Branches:
- master
- Children:
- 5d550c5
- Parents:
- 66be784
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
conf.c
r66be784 ra02f34f 63 63 conf->ping_timeout = 300; 64 64 conf->user = NULL; 65 conf->max_filetransfer_size = G_MAXUINT; 65 conf->ft_max_size = SIZE_MAX; 66 conf->ft_max_kbps = G_MAXUINT; 67 conf->ft_listen = NULL; 66 68 proxytype = 0; 67 69 … … 307 309 conf->user = g_strdup( ini->value ); 308 310 } 311 else if( g_strcasecmp( ini->key, "ft_max_size" ) == 0 ) 312 { 313 size_t ft_max_size; 314 if( sscanf( ini->value, "%zu", &ft_max_size ) != 1 ) 315 { 316 fprintf( stderr, "Invalid %s value: %s\n", ini->key, ini->value ); 317 return 0; 318 } 319 conf->ft_max_size = ft_max_size; 320 } 321 else if( g_strcasecmp( ini->key, "ft_max_kbps" ) == 0 ) 322 { 323 if( sscanf( ini->value, "%d", &i ) != 1 ) 324 { 325 fprintf( stderr, "Invalid %s value: %s\n", ini->key, ini->value ); 326 return 0; 327 } 328 conf->ft_max_kbps = i; 329 } 330 else if( g_strcasecmp( ini->key, "ft_listen" ) == 0 ) 331 { 332 g_free( conf->ft_listen ); 333 conf->ft_listen = g_strdup( ini->value ); 334 } 309 335 else 310 336 {
Note: See TracChangeset
for help on using the changeset viewer.