summaryrefslogtreecommitdiffstats
path: root/src/peer.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-03-30 17:14:10 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-03-30 17:14:10 +0200
commit23e76b0d25da0b6884a445cba15bbba40afb6df8 (patch)
treef58cccd7f2f40839f25e6e77eb0baa5169f9c347 /src/peer.h
parent002fd7132a7368a3103ba6d5e09fd8e546a2bfa3 (diff)
downloadfastd-23e76b0d25da0b6884a445cba15bbba40afb6df8.tar
fastd-23e76b0d25da0b6884a445cba15bbba40afb6df8.zip
Correctly update seen time when data is received from a peer
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 0e258a0..b100739 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -111,6 +111,10 @@ static inline void fastd_peer_set_established(fastd_context *ctx, fastd_peer *pe
}
}
+static inline void fastd_peer_seen(fastd_context *ctx, fastd_peer *peer) {
+ peer->seen = ctx->now;
+}
+
static inline bool fastd_eth_addr_is_unicast(const fastd_eth_addr *addr) {
return ((addr->data[0] & 1) == 0);
}