fix(network): read AccessPoints instead of AllAccessPoints for scan list

AllAccessPoints is not exposed by this NetworkManager ('No such property'),
so getAccessPoints() hit the error path and returned an empty scan list
with no log output. AccessPoints is the current scan results and is
universally supported. Also log the property-read failure instead of
failing silently.
This commit is contained in:
NeilClack
2026-08-12 14:38:22 -05:00
parent 20af03fe82
commit bc165ef40f
+5 -2
View File
@@ -34,7 +34,7 @@ AccessPointInfo parseAccessPoint(
ap.wpa_flags = wpa_flags;
ap.rsn_flags = rsn_flags;
ap.security = detectSecurityType(flags, wpa_flags, rsn_flags);
return ap;
}
@@ -211,13 +211,16 @@ std::vector<AccessPointInfo> WifiDevice::getAccessPoints() const {
"org.freedesktop.NetworkManager",
impl_->object_path.c_str(),
"org.freedesktop.NetworkManager.Device.Wireless",
"AllAccessPoints",
"AccessPoints",
&error,
&msg,
"ao"
);
if (r < 0) {
radiantwave::logger::Logger::instance().warning("WiFi",
"Failed to read AccessPoints on device " + impl_->object_path + ": " +
(error.message ? error.message : strerror(-r)));
sd_bus_error_free(&error);
return result;
}