Merge pull request #137 from darconeous/pull-requests/platform-avr-ravenusb-httpd-isused-fix

Fix for avr-ravenusb target builds due to missing 'isused'.
This commit is contained in:
Adam Dunkels 2013-03-09 06:24:46 -08:00
commit 9c8f1d5356
1 changed files with 14 additions and 15 deletions

View File

@ -276,24 +276,23 @@ PT_THREAD(generate_routes(struct httpd_state *s))
ADD("<h2>Routes [%u max]</h2>",UIP_DS6_ROUTE_NB); ADD("<h2>Routes [%u max]</h2>",UIP_DS6_ROUTE_NB);
PSOCK_GENERATOR_SEND(&s->sout, generate_string, buf); PSOCK_GENERATOR_SEND(&s->sout, generate_string, buf);
blen = 0; blen = 0;
for(i = 0; i < UIP_DS6_ROUTE_NB; i++) { uip_ds6_route_t *route;
if(uip_ds6_routing_table[i].isused) { for(route = uip_ds6_route_list_head(); route != NULL; route = list_item_next(route)) {
ipaddr_add(&uip_ds6_routing_table[i].ipaddr); ipaddr_add(&route->ipaddr);
ADD("/%u (via ", uip_ds6_routing_table[i].length); ADD("/%u (via ", route->length);
PSOCK_GENERATOR_SEND(&s->sout, generate_string, buf); PSOCK_GENERATOR_SEND(&s->sout, generate_string, buf);
blen=0; blen=0;
ipaddr_add(&uip_ds6_routing_table[i].nexthop); ipaddr_add(&route->nexthop);
if(uip_ds6_routing_table[i].state.lifetime < 600) { if(route->state.lifetime < 600) {
PSOCK_GENERATOR_SEND(&s->sout, generate_string, buf); PSOCK_GENERATOR_SEND(&s->sout, generate_string, buf);
blen=0; blen=0;
ADD(") %lus<br>", uip_ds6_routing_table[i].state.lifetime); ADD(") %lus<br>", route->state.lifetime);
} else { } else {
ADD(")<br>"); ADD(")<br>");
} }
PSOCK_GENERATOR_SEND(&s->sout, generate_string, buf); PSOCK_GENERATOR_SEND(&s->sout, generate_string, buf);
blen = 0; blen = 0;
} }
}
if(blen > 0) { if(blen > 0) {
PSOCK_GENERATOR_SEND(&s->sout, generate_string, buf); PSOCK_GENERATOR_SEND(&s->sout, generate_string, buf);
blen = 0; blen = 0;