From 25ac43dae96068eb815e7bb828df2dff256353fc Mon Sep 17 00:00:00 2001 From: Yasuyuki Tanaka Date: Tue, 7 Feb 2017 23:09:04 +0100 Subject: [PATCH] RPL: move a debug message for RPL_LEAF_ONLY to a correct place --- core/net/rpl/rpl-icmp6.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/net/rpl/rpl-icmp6.c b/core/net/rpl/rpl-icmp6.c index 0b32c6371..733b4e6a4 100644 --- a/core/net/rpl/rpl-icmp6.c +++ b/core/net/rpl/rpl-icmp6.c @@ -218,16 +218,15 @@ dis_input(void) for(instance = &instance_table[0], end = instance + RPL_MAX_INSTANCES; instance < end; ++instance) { if(instance->used == 1) { -#if RPL_LEAF_ONLY - if(!uip_is_addr_mcast(&UIP_IP_BUF->destipaddr)) { - PRINTF("RPL: LEAF ONLY Multicast DIS will NOT reset DIO timer\n"); -#else /* !RPL_LEAF_ONLY */ if(uip_is_addr_mcast(&UIP_IP_BUF->destipaddr)) { +#if RPL_LEAF_ONLY + PRINTF("RPL: LEAF ONLY Multicast DIS will NOT reset DIO timer\n"); +#else /* !RPL_LEAF_ONLY */ PRINTF("RPL: Multicast DIS => reset DIO timer\n"); rpl_reset_dio_timer(instance); - } else { #endif /* !RPL_LEAF_ONLY */ - /* Check if this neighbor should be added according to the policy. */ + } else { + /* Check if this neighbor should be added according to the policy. */ if(rpl_icmp6_update_nbr_table(&UIP_IP_BUF->srcipaddr, NBR_TABLE_REASON_RPL_DIS, NULL) == NULL) { PRINTF("RPL: Out of Memory, not sending unicast DIO, DIS from ");