summaryrefslogtreecommitdiffstats
path: root/src/receive.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-24 16:07:50 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-24 16:07:50 +0200
commit1ae3aae35193dce25e5534b12a46011ec7912bb4 (patch)
tree85d452b2a9cc23f081de7b2f3054801d6d9ea554 /src/receive.c
parent4c0623a080c77ed54fa9fec47c2ab982385cb9a9 (diff)
downloadfastd-1ae3aae35193dce25e5534b12a46011ec7912bb4.tar
fastd-1ae3aae35193dce25e5534b12a46011ec7912bb4.zip
Use simple int64_t timestamps in ms instead of timespecs
Diffstat (limited to 'src/receive.c')
-rw-r--r--src/receive.c4
1 files changed, 2 insertions, 2 deletions
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;
}