From a4b06c221963b592065c163d9f389a747e44b4cc Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Mon, 7 Dec 2020 15:24:52 +0100 Subject: [PATCH] device: Emit VerifyFingerSelected after the method returned In order to be race free, clients need to ignore all signals until after the DBus method to start verification has returned. So the signal must be emitted later than it currently is. --- src/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index 5972dc4..e651d5c 100644 --- a/src/device.c +++ b/src/device.c @@ -1214,13 +1214,13 @@ static gboolean fprint_device_verify_start (FprintDBusDevice *dbus_dev, (GAsyncReadyCallback) verify_cb, rdev); } + fprint_dbus_device_complete_verify_start (dbus_dev, invocation); + /* Emit VerifyFingerSelected telling the front-end which finger * we selected for auth */ g_signal_emit(rdev, signals[SIGNAL_VERIFY_FINGER_SELECTED], 0, finger_num_to_name (finger_num)); - fprint_dbus_device_complete_verify_start (dbus_dev, invocation); - return TRUE; }