From 48f77c26dcb4a9e8d09e718f1b16e6b97c04d9b9 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 3 Aug 2013 03:08:04 +0200 Subject: Add gp_babel_since helper --- src/tlv_types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tlv_types.c') diff --git a/src/tlv_types.c b/src/tlv_types.c index ddf819f..12b7248 100644 --- a/src/tlv_types.c +++ b/src/tlv_types.c @@ -77,7 +77,7 @@ static void handle_tlv_hello(gmrf_context_t *ctx, const gp_babel_tlv_hello_t *tl uint16_t seqno = ntohs(tlv->seqno); if (neigh->last_hello != gmrf_time_unspec) { - int timediff = (gmrf_now(ctx->gmrf) - neigh->last_hello)/10; + int timediff = gp_babel_since(ctx, neigh->last_hello); uint16_t seqexp = neigh->last_seqno + (timediff - neigh->hello_interval/2)/neigh->hello_interval; /* cast to int16_t to ensure correct handling of seqno wrapping */ -- cgit v1.2.3