From 2ffca7de4ef14aa03bc5a855005edbc9849862a7 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 26 Mar 2012 19:16:29 +0200 Subject: Move around some structure fields --- src/fastd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fastd.c') diff --git a/src/fastd.c b/src/fastd.c index 9194301..149a380 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -116,8 +116,10 @@ static void init_socket(fastd_context *ctx) { static void init_peers(fastd_context *ctx) { fastd_peer_config *peer_conf; - for (peer_conf = ctx->conf->peers; peer_conf; peer_conf = peer_conf->next) - fastd_peer_add(ctx, peer_conf); + for (peer_conf = ctx->conf->peers; peer_conf; peer_conf = peer_conf->next) { + if (peer_conf->enabled) + fastd_peer_add(ctx, peer_conf); + } } static void update_time(fastd_context *ctx) { @@ -393,8 +395,6 @@ int main(int argc, char *argv[]) { update_time(&ctx); - conf.protocol->init(&ctx); - init_peers(&ctx); init_tuntap(&ctx); -- cgit v1.2.3