From f37fb374a90456ff910484274e333dd5cecee5bb Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 21 Apr 2014 20:14:06 +0200 Subject: Fix peer group tree traversal when reading peer dirs This broke when conf was made global. --- src/config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.3