upekts: Only release USB interface on exit

The device is already beeing de-initialised from the verify/enroll
commands. Trying it again will result in a timeout error as it is not
responding properly at that point.
This commit is contained in:
Benjamin Berg 2020-05-07 19:04:33 +02:00 committed by Benjamin Berg
parent 8f46de0a60
commit b3565b83e1

View file

@ -856,21 +856,14 @@ dev_init (FpDevice *dev)
fpi_ssm_start (ssm, initsm_done);
}
static void
deinitsm_done (FpiSsm *ssm, FpDevice *dev, GError *error)
{
g_usb_device_release_interface (fpi_device_get_usb_device (dev), 0, 0, NULL);
fpi_device_close_complete (dev, error);
}
static void
dev_exit (FpDevice *dev)
{
FpiSsm *ssm;
GError *error = NULL;
ssm = fpi_ssm_new (dev, deinitsm_state_handler, DEINITSM_NUM_STATES);
fpi_ssm_start (ssm, deinitsm_done);
g_usb_device_release_interface (fpi_device_get_usb_device (dev), 0, 0, &error);
fpi_device_close_complete (dev, error);
}
static const unsigned char enroll_init[] = {