Skip to content
Snippets Groups Projects
Unverified Commit d44c32a9 authored by George Oikonomou's avatar George Oikonomou Committed by GitHub
Browse files

Merge pull request #546 from simonduq/contrib/rpl-urgent-probing-log

Minor logging changes
parents 2605a517 45d2f61f
No related branches found
No related tags found
No related merge requests found
...@@ -94,11 +94,12 @@ set_global_address(uip_ipaddr_t *prefix, uip_ipaddr_t *iid) ...@@ -94,11 +94,12 @@ set_global_address(uip_ipaddr_t *prefix, uip_ipaddr_t *iid)
uip_ds6_addr_add(&root_ipaddr, 0, ADDR_AUTOCONF); uip_ds6_addr_add(&root_ipaddr, 0, ADDR_AUTOCONF);
LOG_INFO("IPv6 addresses: "); LOG_INFO("IPv6 addresses:\n");
for(i = 0; i < UIP_DS6_ADDR_NB; i++) { for(i = 0; i < UIP_DS6_ADDR_NB; i++) {
state = uip_ds6_if.addr_list[i].state; state = uip_ds6_if.addr_list[i].state;
if(uip_ds6_if.addr_list[i].isused && if(uip_ds6_if.addr_list[i].isused &&
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) { (state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
LOG_INFO("-- ");
LOG_INFO_6ADDR(&uip_ds6_if.addr_list[i].ipaddr); LOG_INFO_6ADDR(&uip_ds6_if.addr_list[i].ipaddr);
LOG_INFO_("\n"); LOG_INFO_("\n");
} }
......
...@@ -104,7 +104,7 @@ update_state(void) ...@@ -104,7 +104,7 @@ update_state(void)
/* how many more IP neighbors can be have? */ /* how many more IP neighbors can be have? */
num_free = NBR_TABLE_MAX_NEIGHBORS - num_used; num_free = NBR_TABLE_MAX_NEIGHBORS - num_used;
LOG_INFO("nbr-policy: free: %d, parents: %d\n", num_free, num_parents); LOG_DBG("nbr-policy: free: %d, parents: %d\n", num_free, num_parents);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static const linkaddr_t * static const linkaddr_t *
...@@ -127,12 +127,12 @@ find_removable_dio(uip_ipaddr_t *from, rpl_dio_t *dio) ...@@ -127,12 +127,12 @@ find_removable_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
/* Add the new neighbor only if it is better than the current worst. */ /* Add the new neighbor only if it is better than the current worst. */
if(dio->rank + curr_instance.min_hoprankinc < worst_rank - curr_instance.min_hoprankinc / 2) { if(dio->rank + curr_instance.min_hoprankinc < worst_rank - curr_instance.min_hoprankinc / 2) {
/* Found *great* neighbor - add! */ /* Found *great* neighbor - add! */
LOG_INFO("nbr-policy: DIO rank %u, worse_rank %u -- add to cache\n", LOG_DBG("nbr-policy: DIO rank %u, worst_rank %u -- add to cache\n",
dio->rank, worst_rank); dio->rank, worst_rank);
return worst_rank_nbr_lladdr; return worst_rank_nbr_lladdr;
} }
LOG_INFO("nbr-policy: DIO rank %u, worse_rank %u -- do not add to cache\n", LOG_DBG("nbr-policy: DIO rank %u, worst_rank %u -- do not add to cache\n",
dio->rank, worst_rank); dio->rank, worst_rank);
return NULL; return NULL;
} }
......
...@@ -405,9 +405,9 @@ rpl_neighbor_select_best(void) ...@@ -405,9 +405,9 @@ rpl_neighbor_select_best(void)
/* The best is not fresh. Probe it (unless there is already an urgent /* The best is not fresh. Probe it (unless there is already an urgent
probing target). We will be called back after the probing anyway. */ probing target). We will be called back after the probing anyway. */
if(curr_instance.dag.urgent_probing_target == NULL) { if(curr_instance.dag.urgent_probing_target == NULL) {
LOG_WARN("best parent is not fresh, schedule urgent probing to "); LOG_INFO("best parent is not fresh, schedule urgent probing to ");
LOG_WARN_6ADDR(rpl_neighbor_get_ipaddr(best)); LOG_INFO_6ADDR(rpl_neighbor_get_ipaddr(best));
LOG_WARN_("\n"); LOG_INFO_("\n");
curr_instance.dag.urgent_probing_target = best; curr_instance.dag.urgent_probing_target = best;
rpl_schedule_probing_now(); rpl_schedule_probing_now();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment