diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-21 20:14:06 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-21 20:14:06 +0200 |
commit | f37fb374a90456ff910484274e333dd5cecee5bb (patch) | |
tree | b686f5d294c5003712a97531d9f0794d060c7756 /src/config.c | |
parent | 505f97771ab63e32b82592a952ae9cf53adf86b9 (diff) | |
download | fastd-f37fb374a90456ff910484274e333dd5cecee5bb.tar fastd-f37fb374a90456ff910484274e333dd5cecee5bb.zip |
Fix peer group tree traversal when reading peer dirs
This broke when conf was made global.
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index 75c4709..1c3438e 100644 --- a/src/config.c +++ b/src/config.c @@ -593,11 +593,13 @@ void fastd_config_verify(void) { static void peer_dirs_read_peer_group(void) { read_peer_dirs(); - fastd_peer_group_config_t *group; + fastd_peer_group_config_t *base = conf.peer_group, *group; for (group = conf.peer_group->children; group; group = group->next) { conf.peer_group = group; peer_dirs_read_peer_group(); } + + conf.peer_group = base; } static void peer_dirs_handle_old_peers(fastd_peer_config_t **old_peers, fastd_peer_config_t **new_peers) { |