From ef828542e7aa32cdcef71a167e1597f8860164d0 Mon Sep 17 00:00:00 2001 From: RAFI <103924677+cmuhammedrafi@users.noreply.github.com> Date: Mon, 31 Aug 2026 20:21:59 +0530 Subject: [PATCH] RDK-61898: Internet Status Publishing in Deep Sleep Scenarios (#340) * connectivity monitor tirgger for connectivity check * updated connectivity ideal thread * updated error * internet status change trigger updated * updated log line * updated review commments * Comment line change Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * copilot review comment addressed --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- plugin/NetworkManagerConnectivity.cpp | 13 ++++--------- plugin/NetworkManagerImplementation.cpp | 4 ++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/plugin/NetworkManagerConnectivity.cpp b/plugin/NetworkManagerConnectivity.cpp index 93825d512..57243aaef 100644 --- a/plugin/NetworkManagerConnectivity.cpp +++ b/plugin/NetworkManagerConnectivity.cpp @@ -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; } @@ -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; diff --git a/plugin/NetworkManagerImplementation.cpp b/plugin/NetworkManagerImplementation.cpp index 8325a9453..efdba7faa 100644 --- a/plugin/NetworkManagerImplementation.cpp +++ b/plugin/NetworkManagerImplementation.cpp @@ -1481,6 +1481,8 @@ namespace WPEFramework { 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(); } @@ -1519,6 +1521,8 @@ namespace WPEFramework NMLOG_ERROR("OnPowerModeChanged: ReacquireDHCPLease(eth0) failed"); } } + // DeepSleep → Standby wake (Network Standby ON): re-verify connectivity so internet status is re-published. + connectivityMonitor.switchToInitialCheck(); } }