Hi All,
I think I found an error on DHCPC.C
The following piece of code:
do {
send_request();
timer_set(&s.timer, s.ticks);
PT_WAIT_UNTIL(&s.pt, uip_newdata() || timer_expired(&s.timer));
if(uip_newdata() && parse_msg() == DHCPACK) {
s.state = STATE_CONFIG_RECEIVED;
break;
}
if(s.ticks <= CLOCK_SECOND * 10) {
s.ticks += CLOCK_SECOND;
} else {
PT_RESTART(&s.pt);
}
} while(s.state != STATE_CONFIG_RECEIVED);
The send_request function should send a package over the interface, but it
never does as PT_WAIT_UNTIL never returns too its caller because uip_newdata is
TRUE before the send_request, we get to this point because of it.
So, the PT_WAIT_UNTIL should be changed to PT_YIELD_UNTIL and everything should
work.
Its like this on Contiki code.
Another think: the LC-SWITCH.C has this two lines that are wrong:
#ifndef __LC_SWITCH_H__
#define __LC_SWTICH_H__
Of course its a typo on the second one.
I thougth you should know about it.
Hope it helps,
Pablo Cossutta
Argentina
------------------------------------------------------------------------------
deArriba me paga por navegar. Vos tambien podes ganar $$$ navegando. Entra a
www.dearriba.com.