From a6fa92d1c8774a704fd4a869fc5d7799528b084f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 26 Mar 2013 05:39:11 +0100 Subject: Send announce and seqno requests --- src/tlv_types.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/tlv_types.c') diff --git a/src/tlv_types.c b/src/tlv_types.c index d3f2d92..cc380ea 100644 --- a/src/tlv_types.c +++ b/src/tlv_types.c @@ -182,16 +182,16 @@ static void handle_tlv_update(gmrf_t *gmrf, gmrf_context_t *ctx, const gp_babel_ } else { if (!feasible && nexthop == announce->selected) { - gmrf_logf(gmrf, LOG_DEBUG, "need new seqno"); - // gp_babel_send_seqno_request_for(neigh, announce); + gmrf_logf(gmrf, LOG_DEBUG, "requesting new seqno"); + gp_babel_send_seqno_request_for(gmrf, ctx, neigh, announce); nexthop = NULL; } } if (!feasible && nexthop && nexthop != announce->selected) { if (ms.metric + gp_babel_neigh_get_cost(gmrf, neigh) < announce->metric.metric) { - gmrf_logf(gmrf, LOG_DEBUG, "need new seqno"); - // gp_babel_send_seqno_request_for(neigh, announce); + gmrf_logf(gmrf, LOG_DEBUG, "requesting new seqno"); + gp_babel_send_seqno_request_for(gmrf, ctx, neigh, announce); } } @@ -205,8 +205,8 @@ static void handle_tlv_update(gmrf_t *gmrf, gmrf_context_t *ctx, const gp_babel_ announce->len = 0xff; /* request payload */ - //if (nexthop) - // gp_babel_send_announce_request(arg->iface, neigh, announce->node, announce->type, announce->key, true); + if (nexthop) + gp_babel_send_announce_request(gmrf, ctx, NULL, neigh, &announce->node, announce->type, announce->key, true); } } @@ -215,7 +215,7 @@ static void handle_tlv_update(gmrf_t *gmrf, gmrf_context_t *ctx, const gp_babel_ gmrf_logf(gmrf, LOG_DEBUG, "the update was accepted."); - gp_babel_announce_update_nexthop(gmrf, announce, nexthop, ms, ntohs(tlv_update->interval)); + gp_babel_announce_update_nexthop(gmrf, ctx, announce, nexthop, ms, ntohs(tlv_update->interval)); } static void handle_tlv(gmrf_t *gmrf, gmrf_context_t *ctx, gp_babel_tlv_type_t type, const void *data, size_t len, void *arg) { -- cgit v1.2.3