diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-03 03:08:04 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-03 03:08:04 +0200 |
commit | 48f77c26dcb4a9e8d09e718f1b16e6b97c04d9b9 (patch) | |
tree | 97c5c77b15b82e5ba68f0b60abb04151ca78821a /src/route.c | |
parent | 8ca5dead7f2870ae7a3ea40f40bec5cb9acde2d0 (diff) | |
download | babel-48f77c26dcb4a9e8d09e718f1b16e6b97c04d9b9.tar babel-48f77c26dcb4a9e8d09e718f1b16e6b97c04d9b9.zip |
Add gp_babel_since helper
Diffstat (limited to 'src/route.c')
-rw-r--r-- | src/route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/route.c b/src/route.c index 163fb24..64107b2 100644 --- a/src/route.c +++ b/src/route.c @@ -109,7 +109,7 @@ static void maintain_nexthops(gmrf_context_t *ctx, gp_babel_route_t *route) { continue; } - if (gmrf_now(ctx->gmrf) > nexthop->last_update+GP_BABEL_UPDATE_TIMEOUT(nexthop->interval)*10) { + if (gp_babel_since(ctx, nexthop->last_update) > GP_BABEL_UPDATE_TIMEOUT(nexthop->interval)) { if (nexthop->metric_seqno.metric == GP_BABEL_INFINITY) { *cur = *next; next = cur; @@ -126,7 +126,7 @@ static void maintain_nexthops(gmrf_context_t *ctx, gp_babel_route_t *route) { nexthop->last_update += GP_BABEL_UPDATE_TIMEOUT(nexthop->interval)*10; } } - else if (gmrf_now(ctx->gmrf) > nexthop->last_update+GP_BABEL_UPDATE_REQUEST_TIMEOUT(nexthop->interval)*10 && route->selected == nexthop) { + else if (gp_babel_since(ctx, nexthop->last_update) > GP_BABEL_UPDATE_REQUEST_TIMEOUT(nexthop->interval)*10 && route->selected == nexthop) { if (!nexthop->requested_update) { gmrf_logf(ctx->gmrf, LOG_INFO, "route about to expire, requesting update"); gp_babel_send_route_request(ctx, NULL, nexthop->neigh, &route->node); |