summaryrefslogtreecommitdiffstats
path: root/src/fastd.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-03-26 19:16:29 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-03-26 19:16:29 +0200
commit2ffca7de4ef14aa03bc5a855005edbc9849862a7 (patch)
tree7168a61299fd0e6b79b6d440018bab6db3914c54 /src/fastd.c
parente89cfb2f0b8159f602ecae6b53c0ee59b112601d (diff)
downloadfastd-2ffca7de4ef14aa03bc5a855005edbc9849862a7.tar
fastd-2ffca7de4ef14aa03bc5a855005edbc9849862a7.zip
Move around some structure fields
Diffstat (limited to 'src/fastd.c')
-rw-r--r--src/fastd.c8
1 files changed, 4 insertions, 4 deletions
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);