From 1ae3aae35193dce25e5534b12a46011ec7912bb4 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 24 Aug 2014 16:07:50 +0200 Subject: Use simple int64_t timestamps in ms instead of timespecs --- src/receive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/receive.c') diff --git a/src/receive.c b/src/receive.c index 10f70e7..f4172f8 100644 --- a/src/receive.c +++ b/src/receive.c @@ -96,7 +96,7 @@ static bool backoff_unknown(const fastd_peer_address_t *addr) { for (i = 0; i < array_size(ctx.unknown_handshakes); i++) { const fastd_handshake_timeout_t *t = &ctx.unknown_handshakes[(ctx.unknown_handshake_pos + i) % array_size(ctx.unknown_handshakes)]; - if (fastd_timed_out(&t->timeout)) + if (fastd_timed_out(t->timeout)) break; if (fastd_peer_address_equal(addr, &t->address)) { @@ -113,7 +113,7 @@ static bool backoff_unknown(const fastd_peer_address_t *addr) { fastd_handshake_timeout_t *t = &ctx.unknown_handshakes[ctx.unknown_handshake_pos]; t->address = *addr; - t->timeout = fastd_in_seconds(MIN_HANDSHAKE_INTERVAL); + t->timeout = ctx.now + MIN_HANDSHAKE_INTERVAL; return false; } -- cgit v1.2.3