From b129838dc4cf27902a7e589b4eb08f8221558707 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Fri, 22 Nov 2013 14:34:34 +0100 Subject: [PATCH] remove all vtimers before (re)scheduliing it --- sys/net/rpl/trickle.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/net/rpl/trickle.c b/sys/net/rpl/trickle.c index f44313c31f..f0d55862bb 100644 --- a/sys/net/rpl/trickle.c +++ b/sys/net/rpl/trickle.c @@ -166,10 +166,12 @@ void trickle_interval_over(void) I_time = timex_set(0, I * 1000); timex_normalize(&I_time); + vtimer_remove(&trickle_t_timer); if (vtimer_set_wakeup(&trickle_t_timer, t_time, timer_over_pid) != 0) { puts("[ERROR] setting Wakeup"); } + vtimer_remove(&trickle_I_timer); if (vtimer_set_wakeup(&trickle_I_timer, I_time, interval_over_pid) != 0) { puts("[ERROR] setting Wakeup"); } @@ -205,6 +207,7 @@ void dao_delay_over(void) dao_counter++; send_DAO(NULL, 0, true, 0); dao_time = timex_set(DEFAULT_WAIT_FOR_DAO_ACK, 0); + vtimer_remove(&dao_timer); vtimer_set_wakeup(&dao_timer, dao_time, dao_delay_over_pid); } else if (ack_received == false) {