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:
Jiří Klimeš
2011-11-24 17:00:33 +01:00
parent 42060fdd89
commit 576acdd2bf

View File

@@ -726,6 +726,13 @@ constructor (GType type,
G_CALLBACK (state_changed_cb),
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;
}