manager: Fix unexport of removed devices

The correct way to unexport the object again is to unexported it on the
manager rather than on the interface skeleton. This fixes notifications
about device removal on DBus.
This commit is contained in:
Benjamin Berg 2020-11-17 14:20:17 +01:00
parent 6eb9f263fd
commit 08fb209aed

View file

@ -249,8 +249,9 @@ device_removed_cb (FprintManager *manager, FpDevice *device, FpContext *context)
if (dev != device)
continue;
g_dbus_interface_skeleton_unexport (
G_DBUS_INTERFACE_SKELETON (rdev));
g_dbus_object_manager_server_unexport (
G_DBUS_OBJECT_MANAGER_SERVER (priv->object_manager),
g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (rdev)));
g_signal_handlers_disconnect_by_data (rdev, manager);