Merge pull request #2102 from yatch/pr/rpl-leaf-only-debug-msg

RPL: move a debug message for RPL_LEAF_ONLY to a correct place
This commit is contained in:
Nicolas Tsiftes 2017-03-10 15:11:31 +01:00 committed by GitHub
commit b756841522

View file

@ -218,16 +218,15 @@ dis_input(void)
for(instance = &instance_table[0], end = instance + RPL_MAX_INSTANCES; for(instance = &instance_table[0], end = instance + RPL_MAX_INSTANCES;
instance < end; ++instance) { instance < end; ++instance) {
if(instance->used == 1) { 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(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"); PRINTF("RPL: Multicast DIS => reset DIO timer\n");
rpl_reset_dio_timer(instance); rpl_reset_dio_timer(instance);
} else {
#endif /* !RPL_LEAF_ONLY */ #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, if(rpl_icmp6_update_nbr_table(&UIP_IP_BUF->srcipaddr,
NBR_TABLE_REASON_RPL_DIS, NULL) == NULL) { NBR_TABLE_REASON_RPL_DIS, NULL) == NULL) {
PRINTF("RPL: Out of Memory, not sending unicast DIO, DIS from "); PRINTF("RPL: Out of Memory, not sending unicast DIO, DIS from ");