diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-03-03 18:41:36 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-03-03 18:41:36 +0100 |
commit | 195be08c47edeaf28bf7c2371ccb4178bbeaae83 (patch) | |
tree | e8161fca4a814a49cda9efb6d937c5902f781081 /src/config.c | |
parent | ff78f87f9b2aae9a5e2e88612fb0c07061919d11 (diff) | |
download | fastd-195be08c47edeaf28bf7c2371ccb4178bbeaae83.tar fastd-195be08c47edeaf28bf7c2371ccb4178bbeaae83.zip |
Make 'peer limit 0' allow no connections
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index b0ad607..d5fd255 100644 --- a/src/config.c +++ b/src/config.c @@ -125,6 +125,7 @@ static void default_config(fastd_config_t *conf) { conf->peer_group = calloc(1, sizeof(fastd_peer_group_config_t)); conf->peer_group->name = strdup("default"); + conf->peer_group->max_connections = -1; } static bool config_match(const char *opt, ...) { @@ -255,6 +256,7 @@ void fastd_config_bind_address(fastd_context_t *ctx, fastd_config_t *conf, const void fastd_config_peer_group_push(fastd_context_t *ctx, fastd_config_t *conf, const char *name) { fastd_peer_group_config_t *group = calloc(1, sizeof(fastd_peer_group_config_t)); group->name = strdup(name); + group->max_connections = -1; group->parent = conf->peer_group; group->next = group->parent->children; |