46 lines
1.4 KiB
Diff
46 lines
1.4 KiB
Diff
From 2dc4f575b333bee8481cb9707ec6ef293b71e4dd Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Berg <bberg@redhat.com>
|
|
Date: Wed, 4 Dec 2019 14:28:08 +0100
|
|
Subject: [PATCH 086/181] elan: Fix internal state machine to ensure correct
|
|
deactivation
|
|
|
|
During calibration, the internal state was stored as INACTIVE. This is
|
|
not true though, the device is actively running state machines.
|
|
|
|
Move the state update to the start of the operation, therefore ensuring
|
|
we don't deactivate without completing the SSM.
|
|
|
|
Note that this will prevent a crash, but the driver still does not
|
|
behave quite correctly when such a state change does happen. However,
|
|
this is just a safety measure as the state change should not happen in
|
|
the first place.
|
|
|
|
See: #203
|
|
---
|
|
libfprint/drivers/elan.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/libfprint/drivers/elan.c b/libfprint/drivers/elan.c
|
|
index 90a0306..9495a48 100644
|
|
--- a/libfprint/drivers/elan.c
|
|
+++ b/libfprint/drivers/elan.c
|
|
@@ -776,7 +776,6 @@ calibrate_complete (FpiSsm *ssm, FpDevice *dev, GError *error)
|
|
}
|
|
else
|
|
{
|
|
- self->dev_state = FP_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON;
|
|
elan_capture (dev);
|
|
}
|
|
|
|
@@ -966,6 +965,7 @@ elan_change_state (FpImageDevice *idev)
|
|
{
|
|
case FP_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON:
|
|
/* activation completed or another enroll stage started */
|
|
+ self->dev_state = FP_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON;
|
|
elan_calibrate (dev);
|
|
break;
|
|
|
|
--
|
|
2.24.1
|
|
|