From 3d3e3ac6e4bff9c62ea1a0fe6bd180e03facfdf2 Mon Sep 17 00:00:00 2001 From: Karunakaran A <48997923+karuna2git@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:30:28 -0500 Subject: [PATCH] DELIA-66721 : Fixed the empty interface being returned in GetIPSettings (#23) Reason for change: Fixed the empty interface being returned in GetIPSettings Test Procedure: as per DELIA-66721 Risks: Low Signed-off-by: Karunakaran A --- LegacyPlugin_WiFiManagerAPIs.h | 2 -- NetworkManagerRDKProxy.cpp | 12 +++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/LegacyPlugin_WiFiManagerAPIs.h b/LegacyPlugin_WiFiManagerAPIs.h index c4545d50..e596fd47 100644 --- a/LegacyPlugin_WiFiManagerAPIs.h +++ b/LegacyPlugin_WiFiManagerAPIs.h @@ -72,8 +72,6 @@ namespace WPEFramework { uint32_t getPairedSSID(const JsonObject& parameters, JsonObject& response); uint32_t getPairedSSIDInfo(const JsonObject& parameters, JsonObject& response); uint32_t isPaired(const JsonObject& parameters, JsonObject& response); - uint32_t setSignalThresholdChangeEnabled(const JsonObject& parameters, JsonObject& response); - uint32_t isSignalThresholdChangeEnabled(const JsonObject& parameters, JsonObject& response); uint32_t getSupportedSecurityModes(const JsonObject& parameters, JsonObject& response); //End methods diff --git a/NetworkManagerRDKProxy.cpp b/NetworkManagerRDKProxy.cpp index 8f83df92..517e135f 100644 --- a/NetworkManagerRDKProxy.cpp +++ b/NetworkManagerRDKProxy.cpp @@ -855,7 +855,17 @@ namespace WPEFramework } /* Return the default interface information */ - interface = string(interface); + if (interface.empty()) + { + string tmpInterface = string(iarmData.interface); + if ("ETHERNET" == tmpInterface) + interface = "eth0"; + else if ("WIFI" == tmpInterface) + interface = "wlan0"; + else + rc = Core::ERROR_BAD_REQUEST; + } + rc = Core::ERROR_NONE; } else