From 08b2315f41e197f1a7adadc5bc7e23de6ceb589a Mon Sep 17 00:00:00 2001 From: zhitao Date: Wed, 4 Mar 2009 08:59:32 +0000 Subject: [PATCH] bugfix: put up busy forwarding flag only after next hop found --- core/net/rime/collect.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/net/rime/collect.c b/core/net/rime/collect.c index 9f7ea41b1..4e27bbe7e 100644 --- a/core/net/rime/collect.c +++ b/core/net/rime/collect.c @@ -36,7 +36,7 @@ * * This file is part of the Contiki operating system. * - * $Id: collect.c,v 1.18 2009/02/16 01:18:53 adamdunkels Exp $ + * $Id: collect.c,v 1.19 2009/03/04 08:59:32 zhitao Exp $ */ /** @@ -202,13 +202,16 @@ node_packet_received(struct runicast_conn *c, rimeaddr_t *from, uint8_t seqno) from->u8[0], from->u8[1], tc->forwarding); if(!tc->forwarding) { - tc->forwarding = 1; n = neighbor_best(); if(n != NULL) { #if CONTIKI_TARGET_NETSIM ether_set_line(n->addr.u8[0], n->addr.u8[1]); #endif /* CONTIKI_TARGET_NETSIM */ + tc->forwarding = 1; runicast_send(c, &n->addr, rimebuf_attr(RIMEBUF_ATTR_MAX_REXMIT)); + } else { + PRINTF("%d.%d: did not find any neighbor to forward to\n", + rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1]); } return; } else {