Print the rank correctly in the debug output.

This commit is contained in:
nvt-se 2010-10-22 15:40:10 +00:00
parent 86823a84fb
commit 00a000cca0

View file

@ -32,7 +32,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: rpl-dag.c,v 1.32 2010/09/15 13:22:22 nvt-se Exp $
* $Id: rpl-dag.c,v 1.33 2010/10/22 15:40:10 nvt-se Exp $
*/
/**
* \file
@ -570,10 +570,11 @@ rpl_process_parent_event(rpl_dag_t *dag, rpl_parent_t *p)
dag->min_rank = dag->rank;
}
PRINTF("RPL: Moving in the DAG from rank %hu to %hu\n",
old_rank, dag->rank);
PRINTF("RPL: The new preferred parent is ");
old_rank, DAG_RANK(dag->rank));
PRINTF("RPL: The preferred parent is ");
PRINT6ADDR(&dag->preferred_parent->addr);
PRINTF(" (rank %u)\n", (unsigned)(dag->preferred_parent->rank));
PRINTF(" (rank %u)\n",
(unsigned)DAG_RANK(dag->preferred_parent->rank, dag));
rpl_reset_dio_timer(dag, 1);
}