Procházet zdrojové kódy

[Bug fixed][DM30][DW30][Ethernet DHCP]: After disable DHCP feature and setup new IP address by using the web page, the IP address will not change.

2020.06.16 / TC Hsu

Actions: Correct the InitEthernet() function, the udhcpc setup of eth0 should dependent on ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient, not ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient.

Image version    : N/A
Image checksum   : N/A

Hardware PWB P/N : N/A
Hardware Version : N/A

Files:

	modified:   EVSE/Projects/DM30/Apps/main.c
	modified:   EVSE/Projects/DW30/Apps/main.c
TC_Hsu před 4 roky
rodič
revize
dd903415bb

+ 1 - 1
EVSE/Projects/DM30/Apps/main.c

@@ -1097,7 +1097,7 @@ void InitEthernet()
     system("echo nameserver 8.8.8.8 > /etc/resolv.conf");       //Google DNS server
     system("echo nameserver 180.76.76.76 > /etc/resolv.conf");  //Baidu DNS server
 
-    if(ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient == 0)
+    if(ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient == 0)
     {
         memset(tmpbuf,0,256);
         sprintf(tmpbuf, "/sbin/udhcpc -i eth0 -x hostname:CSU3_%s -s /root/dhcp_script/eth0.script > /dev/null &", ShmSysConfigAndInfo->SysConfig.SystemId);

+ 1 - 1
EVSE/Projects/DW30/Apps/main.c

@@ -1097,7 +1097,7 @@ void InitEthernet()
     system("echo nameserver 8.8.8.8 > /etc/resolv.conf");       //Google DNS server
     system("echo nameserver 180.76.76.76 > /etc/resolv.conf");  //Baidu DNS server
 
-    if(ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient == 0)
+    if(ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient == 0)
     {
         memset(tmpbuf,0,256);
         sprintf(tmpbuf, "/sbin/udhcpc -i eth0 -x hostname:CSU3_%s -s /root/dhcp_script/eth0.script > /dev/null &", ShmSysConfigAndInfo->SysConfig.SystemId);