39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
From 9dcb941fc0d9d4f81aa588a46e1256fb1b4e9a44 Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Berg <bberg@redhat.com>
|
|
Date: Mon, 13 Jan 2020 17:56:53 +0100
|
|
Subject: [PATCH 175/181] 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 f962b8a..888c931 100644
|
|
--- a/libfprint/fpi-image-device.c
|
|
+++ b/libfprint/fpi-image-device.c
|
|
@@ -415,7 +415,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);
|
|
}
|
|
}
|
|
@@ -463,7 +465,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);
|
|
}
|
|
|
|
--
|
|
2.24.1
|
|
|