mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
egismoc: Assert that current transfer is unset when setting it
We need to ensure that we are not overwriting the instance transfer, so that we can be sure that we are only doing one transfer at time. Also we need to ensure that the ssm unsetting it, is the owner of it.
This commit is contained in:
@@ -263,6 +263,9 @@ egismoc_cmd_ssm_done (FpiSsm *ssm,
|
||||
FpiDeviceEgisMoc *self = FPI_DEVICE_EGISMOC (device);
|
||||
CommandData *data = fpi_ssm_get_data (ssm);
|
||||
|
||||
g_assert (self->cmd_ssm == ssm);
|
||||
g_assert (!self->cmd_transfer || self->cmd_transfer->ssm == ssm);
|
||||
|
||||
self->cmd_ssm = NULL;
|
||||
self->cmd_transfer = NULL;
|
||||
|
||||
@@ -373,6 +376,8 @@ egismoc_exec_cmd (FpDevice *device,
|
||||
buffer_out_length,
|
||||
g_free);
|
||||
transfer->ssm = self->cmd_ssm;
|
||||
|
||||
g_assert (self->cmd_transfer == NULL);
|
||||
self->cmd_transfer = g_steal_pointer (&transfer);
|
||||
data->callback = callback;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user