Kaynağa Gözat

fix dhcp tries

balbekova 7 yıl önce
ebeveyn
işleme
bd08530f07
2 değiştirilmiş dosya ile 4 ekleme ve 2 silme
  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: