diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-07-23 19:48:46 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-07-23 19:48:46 +0200 |
commit | 945cc762afe999bdc9b30fa2818f64e7a5ae2db6 (patch) | |
tree | 16cce8aa878aeb08803e1bb764129f5c510e6be3 /src/peer.h | |
parent | f0a655e9db3a46ab3f0c8bba7af548ff440ab98e (diff) | |
download | fastd-945cc762afe999bdc9b30fa2818f64e7a5ae2db6.tar fastd-945cc762afe999bdc9b30fa2818f64e7a5ae2db6.zip |
Prepare for improved peer state handling
Diffstat (limited to 'src/peer.h')
-rw-r--r-- | src/peer.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -40,7 +40,7 @@ struct fastd_peer { fastd_peer_address_t local_address; fastd_peer_address_t address; - bool established; + fastd_peer_state_t state; struct timespec last_resolve; struct timespec last_resolve_return; @@ -144,7 +144,13 @@ static inline bool fastd_peer_is_temporary(const fastd_peer_t *peer) { } static inline bool fastd_peer_is_established(const fastd_peer_t *peer) { - return peer->established; + switch(peer->state) { + case STATE_ESTABLISHED: + return true; + + default: + return false; + } } static inline void fastd_peer_seen(fastd_context_t *ctx, fastd_peer_t *peer) { |