mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
synaptics: Remove unneeded complete error/data parameters
Remove the never-used cmd_complete_data value and the repetition of cmd_complete_error. In fact now as per the fpi_device_verify_report() usage, we already pass the match information to the device, such as the error and it will be they will be used on completion if needed. This allows to simplify cmd_ssm_done() as well.
This commit is contained in:
committed by
Marco Trevisan
parent
8893840ffa
commit
8be861b876
@@ -279,17 +279,10 @@ cmd_ssm_done (FpiSsm *ssm, FpDevice *dev, GError *error)
|
||||
self->cmd_ssm = NULL;
|
||||
|
||||
/* Notify about the SSM failure from here instead. */
|
||||
if (error)
|
||||
{
|
||||
callback (self, NULL, error);
|
||||
}
|
||||
else if (self->cmd_complete_on_removal)
|
||||
{
|
||||
callback (self, NULL, self->cmd_complete_error);
|
||||
self->cmd_complete_error = NULL;
|
||||
}
|
||||
if (error || self->cmd_complete_on_removal)
|
||||
callback (self, NULL, error);
|
||||
|
||||
self->cmd_complete_on_removal = FALSE;
|
||||
g_clear_pointer (&self->cmd_complete_error, g_error_free);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -621,8 +614,6 @@ verify_msg_cb (FpiDeviceSynaptics *self,
|
||||
{
|
||||
fp_dbg ("delaying retry error until after finger removal!");
|
||||
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));
|
||||
}
|
||||
@@ -630,8 +621,6 @@ verify_msg_cb (FpiDeviceSynaptics *self,
|
||||
{
|
||||
fp_dbg ("delaying match failure until after finger removal!");
|
||||
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)
|
||||
|
||||
@@ -110,8 +110,6 @@ struct _FpiDeviceSynaptics
|
||||
FpiSsm *cmd_ssm;
|
||||
FpiUsbTransfer *cmd_pending_transfer;
|
||||
gboolean cmd_complete_on_removal;
|
||||
GError *cmd_complete_error;
|
||||
void *cmd_complete_data;
|
||||
|
||||
bmkt_sensor_version_t mis_version;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user