summaryrefslogtreecommitdiffstats
path: root/src/peer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.h')
-rw-r--r--src/peer.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/peer.h b/src/peer.h
index 217e5e4..43a6d02 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -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) {