From db14995c319119cca2c453b037ac69add8a871b6 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Mon, 13 Jan 2020 17:56:53 +0100 Subject: [PATCH] image-device: Set cancelling when errors are reported Allow the AWAIT_FINGER_ON to deactivation state transition after errors are reported. --- libfprint/fpi-image-device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libfprint/fpi-image-device.c b/libfprint/fpi-image-device.c index 0af70ba..cb0c40c 100644 --- a/libfprint/fpi-image-device.c +++ b/libfprint/fpi-image-device.c @@ -419,7 +419,9 @@ fpi_image_device_retry_scan (FpImageDevice *self, FpDeviceRetry retry) /* We abort the operation and let the surrounding code retry in the * non-enroll case (this is identical to a session error). */ g_debug ("Abort current operation due to retry (non-enroll case)"); + priv->cancelling = TRUE; fpi_image_device_deactivate (self); + priv->cancelling = FALSE; fpi_device_action_error (FP_DEVICE (self), error); } } @@ -467,7 +469,9 @@ fpi_image_device_session_error (FpImageDevice *self, GError *error) if (error->domain == FP_DEVICE_RETRY) g_warning ("Driver should report retries using fpi_image_device_retry_scan!"); + priv->cancelling = TRUE; fpi_image_device_deactivate (self); + priv->cancelling = FALSE; fpi_device_action_error (FP_DEVICE (self), error); }