Always add neighbors to the list regardless if their rtmetric is higher than ours or not. If our rtmetric rises, we may need ot have those neighbors in our list.
This commit is contained in:
parent
98854f80e0
commit
f6cf045413
1 changed files with 2 additions and 4 deletions
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: tree.c,v 1.15 2007/11/17 18:05:21 adamdunkels Exp $
|
||||
* $Id: tree.c,v 1.16 2007/11/26 23:31:44 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -249,9 +249,7 @@ adv_received(struct nbh_conn *c, rimeaddr_t *from, uint16_t rtmetric)
|
|||
n = neighbor_find(from);
|
||||
|
||||
if(n == NULL) {
|
||||
if(rtmetric < tc->local_rtmetric) {
|
||||
neighbor_add(from, rtmetric, 1);
|
||||
}
|
||||
neighbor_add(from, rtmetric, 1);
|
||||
} else {
|
||||
neighbor_update(n, rtmetric);
|
||||
PRINTF("%d.%d: updating neighbor %d.%d, etx %d, hops %d\n",
|
||||
|
|
Loading…
Reference in a new issue