瀏覽代碼

fix dhcp tries

balbekova 7 年之前
父節點
當前提交
bd08530f07
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 2 1
      modules/Ethernet/netconf.c
  2. 2 1
      service_hw/Ethernet/netconf.c

+ 2 - 1
modules/Ethernet/netconf.c

@@ -167,10 +167,11 @@ void LwIP_DHCP_task(void * pvParameters)
   struct ip4_addr gw;
   uint8_t DHCP_state;  
   DHCP_state = DHCP_START;
-  struct dhcp *dhcp = netif_dhcp_data(&xnetif);
   
+
   for (;;)
   {
+	  struct dhcp *dhcp = netif_dhcp_data(&xnetif);
     switch (DHCP_state)
     {
       case DHCP_START:

+ 2 - 1
service_hw/Ethernet/netconf.c

@@ -90,10 +90,11 @@ void LwIP_DHCP_task(void * pvParameters)
   struct ip4_addr gw;
   uint8_t DHCP_state;  
   DHCP_state = DHCP_START;
-  struct dhcp *dhcp = netif_dhcp_data(&xnetif);
+
 
   for (;;)
   {
+	  struct dhcp *dhcp = netif_dhcp_data(&xnetif);
     switch (DHCP_state)
     {
       case DHCP_START: