mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
ssm: Remove delayed action GCancellable integration
Unfortunately, the implementation was not thread safe and was not sticking to the thread local main context. In addition to this, it is not entirely clear to me how this API should behave. The current approach is to simply cancel the transition with the state machine halting in its current state. Instead, it could also make sense for cancellation to cause the state machine to return a G_IO_ERROR_CANCELLED. As such, simply remove the feature for now. If anyone actually has a good use-case then we can add it again.
This commit is contained in:
@@ -785,7 +785,7 @@ m_loop_state (FpiSsm *ssm, FpDevice *_dev)
|
||||
|
||||
case M_LOOP_0_SLEEP:
|
||||
/* Wait fingerprint scanning */
|
||||
fpi_ssm_next_state_delayed (ssm, 50, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 50);
|
||||
break;
|
||||
|
||||
case M_LOOP_0_GET_STATE:
|
||||
@@ -828,7 +828,7 @@ m_loop_state (FpiSsm *ssm, FpDevice *_dev)
|
||||
img_extract (ssm, dev);
|
||||
|
||||
/* Wait handling image */
|
||||
fpi_ssm_next_state_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 10);
|
||||
break;
|
||||
|
||||
case M_LOOP_0_CHECK_ACTION:
|
||||
@@ -851,7 +851,7 @@ m_loop_state (FpiSsm *ssm, FpDevice *_dev)
|
||||
if (vfs_finger_state (self) == VFS_FINGER_PRESENT)
|
||||
{
|
||||
fpi_image_device_report_finger_status (dev, TRUE);
|
||||
fpi_ssm_next_state_delayed (ssm, 250, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 250);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -881,7 +881,7 @@ m_loop_state (FpiSsm *ssm, FpDevice *_dev)
|
||||
|
||||
case M_LOOP_1_SLEEP:
|
||||
/* Wait fingerprint scanning */
|
||||
fpi_ssm_next_state_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 10);
|
||||
break;
|
||||
|
||||
case M_LOOP_2_ABORT_PRINT:
|
||||
@@ -917,7 +917,7 @@ m_loop_state (FpiSsm *ssm, FpDevice *_dev)
|
||||
{
|
||||
/* Wait aborting */
|
||||
self->counter++;
|
||||
fpi_ssm_next_state_delayed (ssm, 100, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1055,7 +1055,7 @@ m_init_state (FpiSsm *ssm, FpDevice *_dev)
|
||||
{
|
||||
/* Wait aborting */
|
||||
self->counter++;
|
||||
fpi_ssm_next_state_delayed (ssm, 100, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1084,7 +1084,7 @@ m_init_state (FpiSsm *ssm, FpDevice *_dev)
|
||||
{
|
||||
/* Wait removing finger */
|
||||
self->counter++;
|
||||
fpi_ssm_next_state_delayed (ssm, 250, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 250);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user