summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-04-21 20:14:06 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-04-21 20:14:06 +0200
commitf37fb374a90456ff910484274e333dd5cecee5bb (patch)
treeb686f5d294c5003712a97531d9f0794d060c7756 /src
parent505f97771ab63e32b82592a952ae9cf53adf86b9 (diff)
downloadfastd-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')
-rw-r--r--src/config.c4
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) {