mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 05:58:01 +02:00
libnm-glib: get access points in constructor to prevent D-Bus errors
The errors appeared due to calling GetAccessPoints() on removed devices: nm_device_wifi_get_access_points: error getting access points: Method "GetAccessPoints" with signature "" on interface "org.freedesktop.NetworkManager.Device.Wireless" doesn't exist
This commit is contained in:
parent
42060fdd89
commit
576acdd2bf
1 changed files with 7 additions and 0 deletions
|
|
@ -726,6 +726,13 @@ constructor (GType type,
|
||||||
G_CALLBACK (state_changed_cb),
|
G_CALLBACK (state_changed_cb),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
/* Get initial access points to prevent possible errors on
|
||||||
|
* AccessPointRemoved signal processing. We could make D-Bus
|
||||||
|
* GetAccessPoints() call on a removed WiFi device object (when
|
||||||
|
* AccessPointRemoved was triggered by removing the device).
|
||||||
|
*/
|
||||||
|
nm_device_wifi_get_access_points (NM_DEVICE_WIFI (object));
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue