diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-06-15 04:13:49 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-06-15 04:13:49 +0200 |
commit | e930fc0f769adacd6674546c07c2d5221bed95cd (patch) | |
tree | 46f4c30fe28a9ca895adf47b0c0a28115bfc4a18 /src/peer.c | |
parent | bffe80f3d28356003c3ca24e3933910d5968697d (diff) | |
download | fastd-e930fc0f769adacd6674546c07c2d5221bed95cd.tar fastd-e930fc0f769adacd6674546c07c2d5221bed95cd.zip |
Allow setting dynamic peers to flaoting
Diffstat (limited to 'src/peer.c')
-rw-r--r-- | src/peer.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |