summaryrefslogtreecommitdiffstats
path: root/src/peer.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-04-26 23:22:12 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-04-26 23:22:24 +0200
commit5871d08a3a519dbc54261c8a18e649ec9cc8bd7f (patch)
tree8c6ce34d5b0b9edec0abdacedbeec49efb969cd7 /src/peer.h
parent36690c7203f0e46665f328fbe82ae3bd573cc6ff (diff)
downloadfastd-5871d08a3a519dbc54261c8a18e649ec9cc8bd7f.tar
fastd-5871d08a3a519dbc54261c8a18e649ec9cc8bd7f.zip
Make on-verify support optional
Diffstat (limited to 'src/peer.h')
-rw-r--r--src/peer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/peer.h b/src/peer.h
index 8cd23c0..74b1074 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -57,8 +57,10 @@ struct fastd_peer {
struct timespec establish_handshake_timeout;
+#ifdef WITH_VERIFY
struct timespec verify_timeout;
struct timespec verify_valid_timeout;
+#endif
fastd_protocol_peer_config_t *protocol_config;
fastd_protocol_peer_state_t *protocol_state;
@@ -151,6 +153,7 @@ static inline void fastd_peer_unschedule_handshake(fastd_peer_t *peer) {
fastd_dlist_remove(&peer->handshake_entry);
}
+#ifdef WITH_VERIFY
static inline void fastd_peer_set_verifying(fastd_peer_t *peer) {
peer->verify_timeout = fastd_in_seconds(conf.min_verify_interval);
}
@@ -161,6 +164,7 @@ static inline void fastd_peer_set_verified(fastd_peer_t *peer, bool ok) {
else
peer->verify_valid_timeout = ctx.now;
}
+#endif
static inline bool fastd_peer_handshake_scheduled(fastd_peer_t *peer) {
return fastd_dlist_linked(&peer->handshake_entry);