diff --git a/src/uip/dhcpc.c b/src/uip/dhcpc.c index 1436b626..678408ac 100644 --- a/src/uip/dhcpc.c +++ b/src/uip/dhcpc.c @@ -30,7 +30,7 @@ * * This file is part of the uIP TCP/IP stack * - * @(#)$Id: dhcpc.c,v 1.2 2006/06/11 21:46:37 adam Exp $ + * @(#)$Id: dhcpc.c,v 1.1 2007/01/04 11:06:35 adamdunkels Exp $ */ #include @@ -274,7 +274,7 @@ PT_THREAD(handle_dhcp(void)) do { send_discover(); s.timer_init = platform_timer_op( ELUA_DHCP_TIMER_ID, PLATFORM_TIMER_OP_START, 0 ); - PT_WAIT_UNTIL(&s.pt, uip_newdata() || platform_timer_get_diff_us( ELUA_DHCP_TIMER_ID, s.timer_init, platform_timer_op( ELUA_DHCP_TIMER_ID, PLATFORM_TIMER_OP_READ, 0 ) ) >= s.ticks ); + PT_YIELD_UNTIL(&s.pt, uip_newdata() || platform_timer_get_diff_us( ELUA_DHCP_TIMER_ID, s.timer_init, platform_timer_op( ELUA_DHCP_TIMER_ID, PLATFORM_TIMER_OP_READ, 0 ) ) >= s.ticks ); if(uip_newdata() && parse_msg() == DHCPOFFER) { uip_flags &= ~UIP_NEWDATA; s.state = STATE_OFFER_RECEIVED; @@ -294,7 +294,7 @@ PT_THREAD(handle_dhcp(void)) do { send_request(); s.timer_init = platform_timer_op( ELUA_DHCP_TIMER_ID, PLATFORM_TIMER_OP_START, 0 ); - PT_WAIT_UNTIL(&s.pt, uip_newdata() || platform_timer_get_diff_us( ELUA_DHCP_TIMER_ID, s.timer_init, platform_timer_op( ELUA_DHCP_TIMER_ID, PLATFORM_TIMER_OP_READ, 0 ) ) >= s.ticks ); + PT_YIELD_UNTIL(&s.pt, uip_newdata() || platform_timer_get_diff_us( ELUA_DHCP_TIMER_ID, s.timer_init, platform_timer_op( ELUA_DHCP_TIMER_ID, PLATFORM_TIMER_OP_READ, 0 ) ) >= s.ticks ); if(uip_newdata() && parse_msg() == DHCPACK) { uip_flags &= ~UIP_NEWDATA;