|
@@ -2985,18 +2985,10 @@ int isReachableInternet()
|
|
|
if (strstr(buf, "inet addr:") > 0)
|
|
|
{
|
|
|
sscanf(buf, "%*s%s", tmp);
|
|
|
- substr(tmp, tmp, strspn(tmp, "addr:"), strlen(buf)-strspn(tmp, "addr:"));
|
|
|
- if (strcmp(tmp, (char *)ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress) != 0)
|
|
|
- {
|
|
|
- strcpy((char *) ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress, tmp);
|
|
|
- }
|
|
|
+ substr((char*)ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress, tmp, strspn(tmp, "addr:"), strlen(tmp)-strspn(tmp, "addr:"));
|
|
|
|
|
|
sscanf(buf, "%*s%*s%*s%s", tmp);
|
|
|
- substr(tmp, tmp, strspn(tmp, "Mask:"), strlen(buf)-strspn(tmp, "Mask:"));
|
|
|
- if (strcmp(tmp, (char *)ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress) != 0)
|
|
|
- {
|
|
|
- strcpy((char *) ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress, tmp);
|
|
|
- }
|
|
|
+ substr((char*)ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress, tmp, strspn(tmp, "Mask:"), strlen(tmp)-strspn(tmp, "Mask:"));
|
|
|
}
|
|
|
}
|
|
|
}
|