|
@@ -167,7 +167,7 @@ void LwIP_DHCP_task(void * pvParameters)
|
|
|
struct ip4_addr gw;
|
|
|
uint8_t DHCP_state;
|
|
|
DHCP_state = DHCP_START;
|
|
|
- static uint8_t dhcpTry = 0;
|
|
|
+ struct dhcp *dhcp = netif_dhcp_data(&xnetif);
|
|
|
|
|
|
for (;;)
|
|
|
{
|
|
@@ -239,7 +239,7 @@ void LwIP_DHCP_task(void * pvParameters)
|
|
|
{
|
|
|
/* DHCP timeout */
|
|
|
//if (xnetif.dhcp->tries > MAX_DHCP_TRIES)
|
|
|
- if (dhcpTry++ > MAX_DHCP_TRIES)
|
|
|
+ if (dhcp->tries > MAX_DHCP_TRIES)
|
|
|
{
|
|
|
DHCP_state = DHCP_TIMEOUT;
|
|
|
|
|
@@ -282,7 +282,7 @@ void LwIP_DHCP_task(void * pvParameters)
|
|
|
default: break;
|
|
|
}
|
|
|
|
|
|
- vTaskDelay(1500);
|
|
|
+ vTaskDelay(250);
|
|
|
}
|
|
|
}
|
|
|
|