RPL: logging fixes

This commit is contained in:
Simon Duquennoy 2015-11-29 21:48:53 +01:00 committed by Simon Duquennoy
parent cd76b4b1c2
commit d53a3a3df2

View file

@ -121,8 +121,7 @@ rpl_print_neighbor_list(void)
uip_ds6_nbr_t * uip_ds6_nbr_t *
rpl_get_nbr(rpl_parent_t *parent) rpl_get_nbr(rpl_parent_t *parent)
{ {
linkaddr_t *lladdr = NULL; const linkaddr_t *lladdr = rpl_get_parent_lladdr(parent);
lladdr = nbr_table_get_lladdr(rpl_parents, parent);
if(lladdr != NULL) { if(lladdr != NULL) {
return nbr_table_get_from_lladdr(ds6_neighbors, lladdr); return nbr_table_get_from_lladdr(ds6_neighbors, lladdr);
} else { } else {
@ -1296,7 +1295,8 @@ rpl_process_parent_event(rpl_instance_t *instance, rpl_parent_t *p)
if(!acceptable_rank(p->dag, p->rank)) { if(!acceptable_rank(p->dag, p->rank)) {
/* The candidate parent is no longer valid: the rank increase resulting /* The candidate parent is no longer valid: the rank increase resulting
from the choice of it as a parent would be too high. */ from the choice of it as a parent would be too high. */
PRINTF("RPL: Unacceptable rank %u\n", (unsigned)p->rank); PRINTF("RPL: Unacceptable rank %u (Current min %u, MaxRankInc %u)\n", (unsigned)p->rank,
p->dag->min_rank, p->dag->instance->max_rankinc);
rpl_nullify_parent(p); rpl_nullify_parent(p);
if(p != instance->current_dag->preferred_parent) { if(p != instance->current_dag->preferred_parent) {
return 0; return 0;