summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-06-15 04:13:49 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-06-15 04:13:49 +0200
commite930fc0f769adacd6674546c07c2d5221bed95cd (patch)
tree46f4c30fe28a9ca895adf47b0c0a28115bfc4a18 /src/peer.c
parentbffe80f3d28356003c3ca24e3933910d5968697d (diff)
downloadfastd-e930fc0f769adacd6674546c07c2d5221bed95cd.tar
fastd-e930fc0f769adacd6674546c07c2d5221bed95cd.zip
Allow setting dynamic peers to flaoting
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/peer.c b/src/peer.c
index a2b6c1a..54db531 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -189,7 +189,7 @@ static inline void setup_peer(fastd_context *ctx, fastd_peer *peer) {
if (!peer->protocol_state)
ctx->conf->protocol->init_peer_state(ctx, peer);
- if (!fastd_peer_is_floating(peer))
+ if (!fastd_peer_is_floating(peer) || fastd_peer_is_dynamic(peer))
fastd_task_schedule_handshake(ctx, peer, 0);
}
@@ -215,6 +215,7 @@ fastd_peer_config* fastd_peer_config_new(fastd_context *ctx, fastd_config *conf)
peer->hostname = NULL;
memset(&peer->address, 0, sizeof(fastd_peer_address));
+ peer->dynamic_float = false;
peer->config_source_dir = NULL;
@@ -310,6 +311,9 @@ bool fastd_peer_config_equal(const fastd_peer_config *peer1, const fastd_peer_co
if (!strequal(peer1->hostname, peer2->hostname))
return false;
+ if(peer1->dynamic_float != peer2->dynamic_float)
+ return false;
+
if (!fastd_peer_address_equal(&peer1->address, &peer2->address))
return false;