libfprint/SOURCES/0168-image-device-Fix-enroll-continuation-after-retry-err.patch
2021-09-09 20:12:38 +00:00

33 lines
1.2 KiB
Diff

From 82e0ec9b9adc3638c7161177398d52deba3a58e5 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Thu, 2 Jan 2020 18:50:01 +0100
Subject: [PATCH 168/181] image-device: Fix enroll continuation after retry
error
Continuing an enroll was broken in case of a retry error. Explicitly add
code to wait for the finger to go OFF after a retry error, and ensure
that the enroll will continue once that has happened.
---
libfprint/fpi-image-device.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libfprint/fpi-image-device.c b/libfprint/fpi-image-device.c
index 975e3a1..efdbb53 100644
--- a/libfprint/fpi-image-device.c
+++ b/libfprint/fpi-image-device.c
@@ -404,6 +404,11 @@ fpi_image_device_retry_scan (FpImageDevice *self, FpDeviceRetry retry)
{
g_debug ("Reporting retry during enroll");
fpi_device_enroll_progress (FP_DEVICE (self), priv->enroll_stage, NULL, error);
+
+ /* Wait for finger removal and re-touch.
+ * TODO: Do we need to check that the finger is already off? */
+ priv->enroll_await_on_pending = TRUE;
+ fp_image_device_change_state (self, FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_OFF);
}
else
{
--
2.24.1