made rank calculation depend on selected parent when joining DAG

This commit is contained in:
Joakim Eriksson 2011-02-08 19:59:50 +01:00
parent bfb471c782
commit d518c84471

View file

@ -477,7 +477,7 @@ join_dag(uip_ipaddr_t *from, rpl_dio_t *dio)
PRINT6ADDR(&dag->dag_id);
PRINTF("\n");
dag->rank = dag->of->calculate_rank(NULL, dio->rank);
dag->rank = dag->of->calculate_rank(p, dio->rank);
dag->min_rank = dag->rank; /* So far this is the lowest rank we know of. */
dag->default_lifetime = dio->default_lifetime;