From 0d7e1e8be4d840f0d528705ef2e53208832d63ff Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 2 Feb 2016 17:16:03 +0100 Subject: [PATCH] Fix PRINTF statement in rpl-timers.c --- core/net/rpl/rpl-timers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/net/rpl/rpl-timers.c b/core/net/rpl/rpl-timers.c index f5f017535..7ddfbcba9 100644 --- a/core/net/rpl/rpl-timers.c +++ b/core/net/rpl/rpl-timers.c @@ -456,10 +456,13 @@ handle_probing_timer(void *ptr) /* Perform probing */ if(target_ipaddr != NULL) { + const struct link_stats *stats = rpl_get_parent_link_stats(probing_target); + (void)stats; PRINTF("RPL: probing %u %s last tx %u min ago\n", rpl_get_parent_llpaddr(probing_target)->u8[7], instance->urgent_probing_target != NULL ? "(urgent)" : "", - (unsigned)((clock_time() - probing_target->last_tx_time) / (60 * CLOCK_SECOND)), + probing_target != NULL ? + (unsigned)((clock_time() - stats->last_tx_time) / (60 * CLOCK_SECOND)) : 0 ); /* Send probe, e.g. unicast DIO or DIS */ RPL_PROBING_SEND_FUNC(instance, target_ipaddr);