Skip to content

Commit

Permalink
RDKEMW-229 : Check the empty interface & ipversion input (rdkcentral#30)
Browse files Browse the repository at this point in the history
Reason for change: Check the empty interface & ipversion input
Test Procedure: Call org.rdk.NetworkManager.GetIPSettings with no input param
Risks: Medium
Signed-off-by: Karunakaran A <[email protected]>
  • Loading branch information
karuna2git committed Nov 15, 2024
1 parent 600bc9c commit 6622fd4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions NetworkManagerJsonRpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,14 @@ namespace WPEFramework
uint32_t rc = Core::ERROR_GENERAL;
Exchange::INetworkManager::IPAddress address{};

string interface = parameters["interface"].String();
string ipversion = parameters["ipversion"].String();
string interface{};
string ipversion{};

if (parameters.HasLabel("interface"))
interface = parameters["interface"].String();

if (parameters.HasLabel("ipversion"))
ipversion = parameters["ipversion"].String();

if (_networkManager)
rc = _networkManager->GetIPSettings(interface, ipversion, address);
Expand Down

0 comments on commit 6622fd4

Please sign in to comment.