From 92aeb53ee854412861ddbf0e6d0718d1cc14d6d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 19 Feb 2024 15:37:47 +0100 Subject: [PATCH] egismoc: Simplify egismoc identification stage handling --- libfprint/drivers/egismoc/egismoc.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/libfprint/drivers/egismoc/egismoc.c b/libfprint/drivers/egismoc/egismoc.c index d957830c..763d9216 100644 --- a/libfprint/drivers/egismoc/egismoc.c +++ b/libfprint/drivers/egismoc/egismoc.c @@ -1181,8 +1181,6 @@ egismoc_identify_check_cb (FpDevice *device, fpi_device_identify_report (device, g_ptr_array_index (prints, index), print, NULL); else fpi_device_identify_report (device, NULL, print, NULL); - - fpi_ssm_next_state (self->task_ssm); } else { @@ -1193,8 +1191,6 @@ egismoc_identify_check_cb (FpDevice *device, fpi_device_verify_report (device, FPI_MATCH_SUCCESS, print, NULL); else fpi_device_verify_report (device, FPI_MATCH_FAIL, print, NULL); - - fpi_ssm_next_state (self->task_ssm); } } /* If device was successfully read but it was a "not matched" */ @@ -1206,22 +1202,19 @@ egismoc_identify_check_cb (FpDevice *device, fp_info ("Print was not identified by the device"); if (fpi_device_get_current_action (device) == FPI_DEVICE_ACTION_VERIFY) - { - fpi_device_verify_report (device, FPI_MATCH_FAIL, NULL, NULL); - fpi_ssm_next_state (self->task_ssm); - } + fpi_device_verify_report (device, FPI_MATCH_FAIL, NULL, NULL); else - { - fpi_device_identify_report (device, NULL, NULL, NULL); - fpi_ssm_next_state (self->task_ssm); - } + fpi_device_identify_report (device, NULL, NULL, NULL); } else { fpi_ssm_mark_failed (self->task_ssm, fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO, "Unrecognized response from device.")); + return; } + + fpi_ssm_next_state (self->task_ssm); } static void