RDKEMW-24199: GetKnownSSIDs in RDKV returning Empty upon Disconnected - #348
RDKEMW-24199: GetKnownSSIDs in RDKV returning Empty upon Disconnected#348me-ha-p wants to merge 5 commits into
Conversation
Reason for change: GetKnownSSIDs must return stored WiFi Profile information. Priority: P2 Test Procedure: Refer ticket Risks: Low Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
Reason for change: GetKnownSSIDs must return stored WiFi Profile information. Priority: P2 Test Procedure: Refer ticket Risks: Low Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
Release of 4.0.0 Rebase
Reason for change: GetKnownSSIDs must return stored WiFi Profile information. Priority: P2 Test Procedure: Refer ticket Risks: Low Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
There was a problem hiding this comment.
🟡 Changes recommended
The current handling of “no known SSIDs” can incorrectly return a list containing an empty string ([""]) instead of an empty list ([]), which is a behavioral bug for API consumers.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the NetworkManager plugin’s “known SSIDs” retrieval to return saved WiFi profile information even when the device is disconnected (notably on RDKV), by switching the RDK backend to query the paired/saved SSID rather than the currently connected SSID.
Changes:
- Add an IARM API identifier for retrieving the saved/paired SSID on RDK (
getPairedSSID). - Update the RDK implementation of
GetKnownSSIDsto callgetPairedSSIDinstead ofgetConnectedSSID. - Adjust the GNOME implementation of
GetKnownSSIDsto always build an iterator (even when no SSIDs are found).
File summaries
| File | Description |
|---|---|
| plugin/rdk/NetworkManagerRDKProxy.h | Adds the new IARM API string constant for getPairedSSID. |
| plugin/rdk/NetworkManagerRDKProxy.cpp | Switches GetKnownSSIDs to use the paired/saved SSID IARM call. |
| plugin/gnome/NetworkManagerGnomeProxy.cpp | Refactors GetKnownSSIDs iterator creation flow when the known-SSID list is empty. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Reason for change: GetKnownSSIDs must return stored WiFi Profile information. Priority: P2 Test Procedure: Refer ticket Risks: Low Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
There was a problem hiding this comment.
🔵 Needs a closer look
Both RDK and GNOME paths can return a single empty-string SSID ([""]) instead of an empty list when no SSID is available, which is incorrect output for an SSID list.
Review details
Suppressed comments (2)
plugin/rdk/NetworkManagerRDKProxy.cpp:1051
- GetKnownSSIDs currently unconditionally pushes the returned
pairedSsid.ssidintossidList. If the IARM call succeeds but there is no paired SSID (empty string), this will serialize as[""]instead of an empty list, which is not a valid SSID value and can confuse clients.
auto &pairedSsid = param.data.getPairedSSID;
std::list<string> ssidList;
ssidList.push_back(string(pairedSsid.ssid));
plugin/gnome/NetworkManagerGnomeProxy.cpp:773
- When
ssidListis empty, this code inserts an empty string element. That will make the RPC/JSON response contain[""]instead of an empty array, which is semantically different and treats "no SSIDs" as a single SSID with an empty name.
if (ssidList.empty())
{
NMLOG_INFO("known ssids not found !");
ssidList.push_back(string());
}
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
Reason for change: GetKnownSSIDs must return stored WiFi Profile information.
Priority: P2
Test Procedure: Refer ticket
Risks: Low
Signed-off-by: Mehavarshni_Palaniswamy@comcast.com