mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-09-04 05:29:04 +00:00
Fixed to only show used address entries at startup and removed hack to make address 'final'
This commit is contained in:
parent
2104fd595f
commit
e268b094d4
@ -154,16 +154,14 @@ print_local_addresses(void)
|
|||||||
int i;
|
int i;
|
||||||
uint8_t state;
|
uint8_t state;
|
||||||
|
|
||||||
PRINTF("Server IPv6 addresses: ");
|
PRINTF("Server 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(state == ADDR_TENTATIVE || state == ADDR_PREFERRED) {
|
if(uip_ds6_if.addr_list[i].isused &&
|
||||||
PRINT6ADDR(&uip_ds6_if.addr_list[i].ipaddr);
|
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
|
||||||
PRINTF("\n");
|
blen = 0;
|
||||||
/* hack to make address "final" */
|
ipaddr_add(&uip_ds6_if.addr_list[i].ipaddr);
|
||||||
if (state == ADDR_TENTATIVE) {
|
PRINTF(" %s\n", buf);
|
||||||
uip_ds6_if.addr_list[i].state = ADDR_PREFERRED;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -203,7 +201,7 @@ PROCESS_THREAD(border_router_process, ev, data)
|
|||||||
while(1) {
|
while(1) {
|
||||||
PROCESS_YIELD();
|
PROCESS_YIELD();
|
||||||
if (ev == sensors_event && data == &button_sensor) {
|
if (ev == sensors_event && data == &button_sensor) {
|
||||||
PRINTF("Initiaing global repair\n");
|
PRINTF("Initiating global repair\n");
|
||||||
rpl_repair_dag(rpl_get_dag(RPL_ANY_INSTANCE));
|
rpl_repair_dag(rpl_get_dag(RPL_ANY_INSTANCE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user