Skip to content

Commit

Permalink
DELIA-65238 : Added connectivity monitoring in onInterfaceIPAddressCh…
Browse files Browse the repository at this point in the history
…anged (rdkcentral#5279)

* Stopping initiating the connectivity monitor in InterfaceConnectionStatusChanged
and added the same in onInterfaceIPAddressChanged.

* Stopping initiating the connectivity monitor in InterfaceConnectionStatusChanged
and added the same in onInterfaceIPAddressChanged.
  • Loading branch information
gururaajar authored May 14, 2024
1 parent 229649e commit 8f25580
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
5 changes: 5 additions & 0 deletions Network/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.3.11] - 2024-05-13
### Added
- Added connectivity monitor in onInterfaceIPAddressChanged
- Removed connectivity monitor from InterfaceConnectionStatusChanged

## [1.3.10] - 2024-04-17
### Added
- added retry logic for connectivity monitor
Expand Down
28 changes: 14 additions & 14 deletions Network/Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ using namespace std;

#define API_VERSION_NUMBER_MAJOR 1
#define API_VERSION_NUMBER_MINOR 3
#define API_VERSION_NUMBER_PATCH 10
#define API_VERSION_NUMBER_PATCH 11

/* Netsrvmgr Based Macros & Structures */
#define IARM_BUS_NM_SRV_MGR_NAME "NET_SRV_MGR"
Expand Down Expand Up @@ -1461,19 +1461,6 @@ typedef struct _IARM_BUS_NetSrvMgr_Iface_EventData_t {
m_defInterfaceCache = "";

sendNotify("onConnectionStatusChanged", params);
if(connected)
{
connectivityMonitor.doInitialConnectivityMonitoring(30);
}
else
{
if (!connectivityMonitor.isMonitorThreadRunning())
{
/*run the thread again to notify no_internet state*/
connectivityMonitor.doInitialConnectivityMonitoring(30);
}
connectivityMonitor.stopInitialConnectivityMonitoring();
}
}

void Network::onInternetStatusChange(nsm_internetState InternetConnectionState)
Expand Down Expand Up @@ -1521,6 +1508,19 @@ typedef struct _IARM_BUS_NetSrvMgr_Iface_EventData_t {
}
params["status"] = string (acquired ? "ACQUIRED" : "LOST");
sendNotify("onIPAddressStatusChanged", params);
if(acquired)
{
connectivityMonitor.doInitialConnectivityMonitoring(30);
}
else
{
if (!connectivityMonitor.isMonitorThreadRunning())
{
/*run the thread again to notify no_internet state*/
connectivityMonitor.doInitialConnectivityMonitoring(30);
}
connectivityMonitor.stopInitialConnectivityMonitoring();
}
connectivityMonitor.signalConnectivityMonitor();
}

Expand Down

0 comments on commit 8f25580

Please sign in to comment.