aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-03-21 16:17:24 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2010-03-21 16:17:24 +0000
commit85693e62c8e847ee0336419c3f229bb5caac29a0 (patch)
tree1e1dbba1cba752b75dcf44394f7d6a0a0b14f934 /conf.c
parent81ee561d520e38535fb6947ac0e3fba808e6de4b (diff)
parent767a148faa35c18cdf4da77b5919a2f6e2df868a (diff)
Merging in killerbee stuff (just file transfers and maybe a few things from
mainline). Once I add ft support glue to protocols/purple/ I guess this will all go into killerbee.
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/conf.c b/conf.c
index b997fb0a..8687afea 100644
--- a/conf.c
+++ b/conf.c
@@ -62,6 +62,9 @@ conf_t *conf_load( int argc, char *argv[] )
conf->ping_interval = 180;
conf->ping_timeout = 300;
conf->user = NULL;
+ conf->ft_max_size = SIZE_MAX;
+ conf->ft_max_kbps = G_MAXUINT;
+ conf->ft_listen = NULL;
conf->protocols = NULL;
proxytype = 0;
@@ -307,6 +310,30 @@ static int conf_loadini( conf_t *conf, char *file )
g_free( conf->user );
conf->user = g_strdup( ini->value );
}
+ else if( g_strcasecmp( ini->key, "ft_max_size" ) == 0 )
+ {
+ size_t ft_max_size;
+ if( sscanf( ini->value, "%zu", &ft_max_size ) != 1 )
+ {
+ fprintf( stderr, "Invalid %s value: %s\n", ini->key, ini->value );
+ return 0;
+ }
+ conf->ft_max_size = ft_max_size;
+ }
+ else if( g_strcasecmp( ini->key, "ft_max_kbps" ) == 0 )
+ {
+ if( sscanf( ini->value, "%d", &i ) != 1 )
+ {
+ fprintf( stderr, "Invalid %s value: %s\n", ini->key, ini->value );
+ return 0;
+ }
+ conf->ft_max_kbps = i;
+ }
+ else if( g_strcasecmp( ini->key, "ft_listen" ) == 0 )
+ {
+ g_free( conf->ft_listen );
+ conf->ft_listen = g_strdup( ini->value );
+ }
else if( g_strcasecmp( ini->key, "protocols" ) == 0 )
{
g_strfreev( conf->protocols );