From ac4558bea06ee9be8733486095a0c997b9308d06 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 27 Jun 2017 23:18:54 +0200 Subject: [PATCH] rpl-lite: minor modifications --- core/net/rpl-lite/rpl-dag.c | 4 ++-- core/net/rpl-lite/rpl-timers.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/net/rpl-lite/rpl-dag.c b/core/net/rpl-lite/rpl-dag.c index 32725d144..4b39f40d8 100644 --- a/core/net/rpl-lite/rpl-dag.c +++ b/core/net/rpl-lite/rpl-dag.c @@ -167,7 +167,7 @@ rpl_global_repair(void) LOG_WARN("initiating global repair, version %u, rank %u)\n", curr_instance.dag.version, curr_instance.dag.rank); #if LOG_INFO_ENABLED - rpl_neighbor_print_list("Global repair"); + rpl_neighbor_print_list("Global repair (before)"); #endif /* LOG_INFO_ENABLED */ /* Initiate global repair */ @@ -184,7 +184,7 @@ global_repair_non_root(rpl_dio_t *dio) LOG_WARN("participating in global repair, version %u, rank %u)\n", curr_instance.dag.version, curr_instance.dag.rank); #if LOG_INFO_ENABLED - rpl_neighbor_print_list("Global repair"); + rpl_neighbor_print_list("Global repair (before)"); #endif /* LOG_INFO_ENABLED */ /* Re-initialize configuration from DIO */ init_dag_from_dio(dio); diff --git a/core/net/rpl-lite/rpl-timers.c b/core/net/rpl-lite/rpl-timers.c index 816487ff5..f8815c993 100644 --- a/core/net/rpl-lite/rpl-timers.c +++ b/core/net/rpl-lite/rpl-timers.c @@ -505,11 +505,15 @@ handle_periodic_timer(void *ptr) rpl_timers_schedule_periodic_dis(); /* Schedule DIS if needed */ } - ctimer_reset(&periodic_timer); + /* Useful because part of the state update is time-dependent, e.g., + the meaning of last_advertised_rank changes with time */ + rpl_dag_update_state(); #if LOG_INFO_ENABLED rpl_neighbor_print_list("Periodic"); #endif /* LOG_INFO_ENABLED */ + + ctimer_reset(&periodic_timer); } /*---------------------------------------------------------------------------*/ void