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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user