Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions plugin/NetworkManagerConnectivity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,21 +634,15 @@ namespace WPEFramework
return false;
}

string defaultIface = _instance->getDefaultInterface();

if(defaultIface.empty())
{
NMLOG_WARNING("default interface not set");
return false;
}

m_notify = true;
m_switchToInitial = true;
m_wakeupMonitoring = true;
m_cmCv.notify_one();

string defaultIface = _instance->getDefaultInterface();
NMLOG_INFO("switching to initial check - eth %s - wlan %s - default interface %s",
_instance->m_ethConnected.load()? "up":"down", _instance->m_wlanConnected.load()? "up":"down", defaultIface.c_str());
_instance->m_ethConnected.load()? "up":"down", _instance->m_wlanConnected.load()? "up":"down",
defaultIface.empty() ? "none" : defaultIface.c_str());

return true;
}
Expand Down Expand Up @@ -704,6 +698,7 @@ namespace WPEFramework
if(defaultIface.empty())
{
NMLOG_WARNING("default interface not set");
currentInternetState = INTERNET_NOT_AVAILABLE;
if (InitialRetryCount == 0)
m_notify = true;
InitialRetryCount = 1;
Expand Down
4 changes: 4 additions & 0 deletions plugin/NetworkManagerImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@
}

{
ActiveInterfaceChangeData eventData{prevActiveInterface, currentActiveinterface};

Check notice

Code scanning / Coverity

Variable copied when it could be moved Low

Variable copied when it could be moved in ReportActiveInterfaceChange
NMLOG_INFO("Posting onActiveInterfaceChange %s", currentActiveinterface.c_str());
enqueueEvent(NM_ON_ACTIVEINTERFACE_CHANGE, std::move(eventData));
}
Expand Down Expand Up @@ -994,7 +994,7 @@
}
#endif
{
InternetStatusChangeData eventData{prevState, currState, interface};

Check notice

Code scanning / Coverity

Variable copied when it could be moved Low

Variable copied when it could be moved in ReportInternetStatusChange
NMLOG_INFO("Posting onInternetStatusChange with current state as %u", (unsigned)currState);
enqueueEvent(NM_ON_INTERNETSTATUS_CHANGE, std::move(eventData));
}
Expand Down Expand Up @@ -1054,7 +1054,7 @@
logSSIDs(LOG_LEVEL_INFO, filterResult);

{
AvailableSSIDsData eventData{jsonOfFilterScanResults};

Check notice

Code scanning / Coverity

Variable copied when it could be moved Low

Variable copied when it could be moved in ReportAvailableSSIDs
enqueueEvent(NM_ON_AVAILABLESSIDS, std::move(eventData));
}
}
Expand Down Expand Up @@ -1382,7 +1382,7 @@
{
LOG_ENTRY_FUNCTION();
{
WiFiSignalQualityChangeData eventData{ssid, strength, noise, snr, quality};

Check notice

Code scanning / Coverity

Variable copied when it could be moved Low

Variable copied when it could be moved in ReportWiFiSignalQualityChange
NMLOG_INFO("Posting onWiFiSignalQualityChange %d", strength);
enqueueEvent(NM_ON_WIFISIGNALQUALITY_CHANGE, std::move(eventData));
}
Expand Down Expand Up @@ -1481,6 +1481,8 @@
{
NMLOG_INFO("OnPowerModePreChange: waking from DeepSleep — WiFi was not connected or was already down before sleep, skipping reconnect");
}
// DeepSleep wake (Network Standby OFF): re-verify connectivity so internet status is re-published.
connectivityMonitor.switchToInitialCheck();
}
sendAck();
}
Expand Down Expand Up @@ -1519,6 +1521,8 @@
NMLOG_ERROR("OnPowerModeChanged: ReacquireDHCPLease(eth0) failed");
}
}
// DeepSleep → Standby wake (Network Standby ON): re-verify connectivity so internet status is re-published.
connectivityMonitor.switchToInitialCheck();
}
}

Expand Down Expand Up @@ -1608,7 +1612,7 @@

std::set<std::string> NetworkManagerImplementation::swapIpCache(
const std::string& iface, const std::string& ipFamily,
IpFamilyCache newCache)

Check notice

Code scanning / Coverity

Big parameter passed by value Low

Big parameter passed by value in swapIpCache
{
std::set<std::string> oldKeys;
std::lock_guard<std::mutex> lock(m_ipCacheMutex);
Expand Down
Loading