From 323d8c3f8523240e4877d703f21c81aebb3dc1d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 13 Jul 2026 11:26:37 +0200 Subject: [PATCH] fpi-device: Do not check for scanned prints equalty on NBIS prints We cannot assume that two NBIS prints are matching without going through proper NBIS checks, so we cannot do a check on the scanned print without an extra thread, which is rather an overkill. So let's just do the check for prints we can actually compare (raw ones for now) --- libfprint/fpi-device.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libfprint/fpi-device.c b/libfprint/fpi-device.c index 65657741..2121537c 100644 --- a/libfprint/fpi-device.c +++ b/libfprint/fpi-device.c @@ -2165,7 +2165,9 @@ fpi_device_verify_report (FpDevice *device, fpi_device_get_verify_data (device, &data->match); g_object_ref (data->match); - if (print && !fpi_print_match (print, data->match)) + if (print && + fpi_print_get_type (print) != FPI_PRINT_NBIS && + !fp_print_equal (print, data->match)) { g_warning ("Driver reported a match providing a scanned print that is not matching it."); g_clear_object (&print); @@ -2264,9 +2266,9 @@ fpi_device_identify_report (FpDevice *device, } else { - if (match && print && + if (match && print && fpi_print_get_type (print) != FPI_PRINT_NBIS && !g_ptr_array_find_with_equal_func (data->gallery, print, - (GEqualFunc) fpi_print_match, NULL)) + (GEqualFunc) fp_print_equal, NULL)) { g_warning ("Driver reported a match providing a scanned print that is not matching any in the gallery."); g_clear_object (&print);