Skip to content

Commit

Permalink
Initiaial connection check added
Browse files Browse the repository at this point in the history
  • Loading branch information
cmuhammedrafi committed Nov 26, 2024
1 parent 0731da0 commit ec9d27a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions NetworkManagerRDKProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ namespace WPEFramework
{
// check the connection state and post event
Exchange::INetworkManager::IInterfaceDetailsIterator* _interfaces{};
uint32_t rc = GetAvailableInterfaces(_interfaces);
uint32_t rc = ::_instance->GetAvailableInterfaces(_interfaces);

if (Core::ERROR_NONE == rc)
{
Expand All @@ -600,16 +600,16 @@ namespace WPEFramework
// ::_instance->ReportInterfaceStateChange(Exchange::INetworkManager::INTERFACE_ADDED, iface.name);
if(iface.connected)
{
NMLOG_INFO("'%s' interface is connected", iface.name);
NMLOG_INFO("'%s' interface is connected", iface.name.c_str());
::_instance->ReportActiveInterfaceChange("unknown", iface.name);
std::string ipversion = {};
Exchange::INetworkManager::IPAddress addr;
rc = GetIPSettings(iface.name, ipversion, addr);
rc = ::_instance->GetIPSettings(iface.name, ipversion, addr);
if (Core::ERROR_NONE == rc)
{
if(!addr.ipaddress.empty()) {
NMLOG_INFO("'%s' interface have ip '%s'", iface.name, addr.ipaddress);
ReportIPAddressChange(iface.name, addr.ipversion, addr.ipaddress, Exchange::INetworkManager::IP_ACQUIRED);
NMLOG_INFO("'%s' interface have ip '%s'", iface.name.c_str(), addr.ipaddress.c_str());
::_instance->ReportIPAddressChange(iface.name, addr.ipversion, addr.ipaddress, Exchange::INetworkManager::IP_ACQUIRED);
}
}
}
Expand Down

0 comments on commit ec9d27a

Please sign in to comment.