summaryrefslogtreecommitdiffstats
path: root/src/protocol_null.c
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/protocol_null.c
parent002fd7132a7368a3103ba6d5e09fd8e546a2bfa3 (diff)
downloadfastd-23e76b0d25da0b6884a445cba15bbba40afb6df8.tar
fastd-23e76b0d25da0b6884a445cba15bbba40afb6df8.zip
Correctly update seen time when data is received from a peer
Diffstat (limited to 'src/protocol_null.c')
-rw-r--r--src/protocol_null.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/protocol_null.c b/src/protocol_null.c
index d9588b3..8648c88 100644
--- a/src/protocol_null.c
+++ b/src/protocol_null.c
@@ -53,7 +53,7 @@ static void protocol_handshake_init(fastd_context *ctx, fastd_peer *peer) {
}
static void establish(fastd_context *ctx, fastd_peer *peer) {
- peer->seen = ctx->now;
+ fastd_peer_seen(ctx, peer);
if (fastd_peer_is_temporary(peer)) {
fastd_peer *perm_peer;
@@ -100,7 +100,7 @@ static void protocol_handshake_handle(fastd_context *ctx, fastd_peer *peer, cons
static void protocol_handle_recv(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer) {
if (fastd_peer_is_established(peer) && buffer.len) {
- peer->seen = ctx->now;
+ fastd_peer_seen(ctx, peer);
fastd_task_put_handle_recv(ctx, peer, buffer);
}
else {