mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
device: Catch client disconnect during Release
If the client disconnected while the release call was stopping the current action, then the disconnect will be processed. This means that the device can be closed already and the session is destroyed. Add a check for this, in the same way that the vanished handler deals with this corner case.
This commit is contained in:
committed by
Benjamin Berg
parent
70182083a1
commit
e3b0d52ce5
@ -1171,6 +1171,14 @@ fprint_device_release (FprintDBusDevice *dbus_dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
session = session_data_get (priv);
|
session = session_data_get (priv);
|
||||||
|
|
||||||
|
/* We iterated the mainloop, the session may have disappeared already. */
|
||||||
|
if (!session)
|
||||||
|
{
|
||||||
|
fprint_dbus_device_complete_release (FPRINT_DBUS_DEVICE (rdev), invocation);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
session->invocation = g_object_ref (invocation);
|
session->invocation = g_object_ref (invocation);
|
||||||
|
|
||||||
priv->current_action = ACTION_CLOSE;
|
priv->current_action = ACTION_CLOSE;
|
||||||
|
|||||||
Reference in New Issue
Block a user