synaptics: Always report verify state early on non-match

In some cases we want to complete the verification after that the finger has
been removed, but we still need to promptly report the match state otherwise
fpi-device will complain about, and will eventually cause a match error
instead that reporting a non-match:

  synaptics: Finger is now on the sensor
  synaptics: Received message with 0 sequence number 0x91, ignoring!
  synaptics: interrupt transfer done
  synaptics: delaying match failure until after finger removal!
  synaptics: interrupt transfer done
  device: Driver reported successful verify complete but did not report the
          result earlier. Reporting error instead
  libfprint: Failed to verify print: An unspecified error occured!

Fixes #227
This commit is contained in:
Marco Trevisan (Treviño) 2020-01-16 19:04:09 +01:00 committed by Marco Trevisan
parent 4d6a7ec09d
commit 8893840ffa

View file

@ -623,6 +623,8 @@ verify_msg_cb (FpiDeviceSynaptics *self,
self->cmd_complete_on_removal = TRUE;
self->cmd_complete_data = GINT_TO_POINTER (FPI_MATCH_ERROR);
self->cmd_complete_error = fpi_device_retry_new (FP_DEVICE_RETRY_GENERAL);
fpi_device_verify_report (device, FPI_MATCH_ERROR, NULL,
fpi_device_retry_new (FP_DEVICE_RETRY_GENERAL));
}
else if (resp->result == BMKT_FP_NO_MATCH)
{
@ -630,6 +632,7 @@ verify_msg_cb (FpiDeviceSynaptics *self,
self->cmd_complete_on_removal = TRUE;
self->cmd_complete_data = GINT_TO_POINTER (FPI_MATCH_FAIL);
self->cmd_complete_error = NULL;
fpi_device_verify_report (device, FPI_MATCH_FAIL, NULL, NULL);
}
else if (resp->result == BMKT_FP_DATABASE_NO_RECORD_EXISTS)
{