fix the LWIP DHCP option issue
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@17 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
6a6715551e
commit
081698be20
|
@ -23,6 +23,8 @@ void lwip_sys_init()
|
||||||
struct ip_addr ipaddr, netmask, gw;
|
struct ip_addr ipaddr, netmask, gw;
|
||||||
|
|
||||||
#if LWIP_DHCP
|
#if LWIP_DHCP
|
||||||
|
rt_uint32_t mscnt = 0;
|
||||||
|
|
||||||
IP4_ADDR(&gw, 0,0,0,0);
|
IP4_ADDR(&gw, 0,0,0,0);
|
||||||
IP4_ADDR(&ipaddr, 0,0,0,0);
|
IP4_ADDR(&ipaddr, 0,0,0,0);
|
||||||
IP4_ADDR(&netmask, 0,0,0,0);
|
IP4_ADDR(&netmask, 0,0,0,0);
|
||||||
|
@ -42,7 +44,7 @@ void lwip_sys_init()
|
||||||
dhcp_start(netif_default);
|
dhcp_start(netif_default);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
sleep(DHCP_FINE_TIMER_MSECS);
|
rt_thread_delay(DHCP_FINE_TIMER_MSECS);
|
||||||
|
|
||||||
dhcp_fine_tmr();
|
dhcp_fine_tmr();
|
||||||
mscnt += DHCP_FINE_TIMER_MSECS;
|
mscnt += DHCP_FINE_TIMER_MSECS;
|
||||||
|
|
Loading…
Reference in New Issue