diff --git a/src/gui/network_setup.cpp b/src/gui/network_setup.cpp index 06048702a..2d0d8ac31 100644 --- a/src/gui/network_setup.cpp +++ b/src/gui/network_setup.cpp @@ -604,8 +604,8 @@ void CNetworkSetup::showCurrentNetworkSettings() else { netGetNameserver(nameserver); netGetDefaultRoute(router); - CNetworkConfig networkConfig; - std::string dhcp = networkConfig.inet_static ? g_Locale->getText(LOCALE_OPTIONS_OFF) : g_Locale->getText(LOCALE_OPTIONS_ON); + CNetworkConfig _networkConfig; + std::string dhcp = _networkConfig.inet_static ? g_Locale->getText(LOCALE_OPTIONS_OFF) : g_Locale->getText(LOCALE_OPTIONS_ON); text = (std::string)g_Locale->getText(LOCALE_NETWORKMENU_DHCP) + ": " + dhcp + '\n' + g_Locale->getText(LOCALE_NETWORKMENU_IPADDRESS ) + ": " + ip + '\n' diff --git a/src/system/configure_network.cpp b/src/system/configure_network.cpp index 3bc1526c1..6c17fb156 100644 --- a/src/system/configure_network.cpp +++ b/src/system/configure_network.cpp @@ -220,9 +220,9 @@ void CNetworkConfig::startNetwork(void) std::string cmd = "/sbin/ifup " + ifname; #ifdef DEBUG printf("CNetworkConfig::startNetwork: %s\n", cmd.c_str()); -#else - system(cmd.c_str()); #endif + system(cmd.c_str()); + if (!inet_static) { init_vars(); } @@ -234,9 +234,9 @@ void CNetworkConfig::stopNetwork(void) std::string cmd = "/sbin/ifdown " + ifname; #ifdef DEBUG printf("CNetworkConfig::stopNetwork: %s\n", cmd.c_str()); -#else - system(cmd.c_str()); #endif + system(cmd.c_str()); + } void CNetworkConfig::readWpaConfig()