diff --git a/NetworkManager.cpp b/NetworkManager.cpp index baa8d48..dea921c 100644 --- a/NetworkManager.cpp +++ b/NetworkManager.cpp @@ -44,7 +44,7 @@ namespace WPEFramework _notification(this) { // Don't do any work in the constructor - all set up should be done in Initialize - m_primaryInterfaceCache = "wlan0"; + m_primaryInterfaceCache = "eth0"; } NetworkManager::~NetworkManager() diff --git a/NetworkManager.h b/NetworkManager.h index 1838c54..deeb34b 100644 --- a/NetworkManager.h +++ b/NetworkManager.h @@ -195,6 +195,8 @@ namespace WPEFramework result["state"] = static_cast (state); _parent.Notify("onWiFiStateChange", result); _parent.m_wifiStateCache = state; + if(Exchange::INetworkManager::WiFiState::WIFI_STATE_CONNECTED == state || Exchange::INetworkManager::WiFiState::WIFI_STATE_DISCONNECTED == state) + _parent.m_primaryInterfaceCache.reset(); } void onWiFiSignalStrengthChange(const string ssid, const string signalLevel, const Exchange::INetworkManager::WiFiSignalQuality signalQuality) override