From 54286c7603d61c32eb51fcb0654a406371b5060b Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Mon, 13 Jan 2020 17:24:19 +0100 Subject: [PATCH] image-device: Handle retry error propagation correctly With the early reporting mechanism the retry error propagation needs to be adjusted. Do the appropriate changes. --- libfprint/fpi-image-device.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/libfprint/fpi-image-device.c b/libfprint/fpi-image-device.c index cb0c40c8..6fc82802 100644 --- a/libfprint/fpi-image-device.c +++ b/libfprint/fpi-image-device.c @@ -414,6 +414,22 @@ fpi_image_device_retry_scan (FpImageDevice *self, FpDeviceRetry retry) priv->enroll_await_on_pending = TRUE; fp_image_device_change_state (self, FPI_IMAGE_DEVICE_STATE_AWAIT_FINGER_OFF); } + else if (action == FPI_DEVICE_ACTION_VERIFY) + { + fpi_device_verify_report (FP_DEVICE (self), FPI_MATCH_ERROR, NULL, error); + priv->cancelling = TRUE; + fpi_image_device_deactivate (self); + priv->cancelling = FALSE; + fpi_device_verify_complete (FP_DEVICE (self), NULL); + } + else if (action == FPI_DEVICE_ACTION_IDENTIFY) + { + fpi_device_identify_report (FP_DEVICE (self), NULL, NULL, error); + priv->cancelling = TRUE; + fpi_image_device_deactivate (self); + priv->cancelling = FALSE; + fpi_device_identify_complete (FP_DEVICE (self), NULL); + } else { /* We abort the operation and let the surrounding code retry in the