mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
virtual_image: Open a window for race conditions during open/close
Delay the open/close callbacks by 100ms so that we have a window of opportunity for race conditions. This is needed to test certain conditiosn in fprintd.
This commit is contained in:
committed by
Marco Trevisan
parent
fab349f356
commit
a63dcc96d5
@@ -288,7 +288,8 @@ dev_init (FpImageDevice *dev)
|
||||
|
||||
start_listen (self);
|
||||
|
||||
fpi_image_device_open_complete (dev, NULL);
|
||||
/* Delay result to open up the possibility of testing race conditions. */
|
||||
fpi_device_add_timeout (FP_DEVICE (dev), 100, (FpTimeoutFunc) fpi_image_device_open_complete, NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -303,7 +304,8 @@ dev_deinit (FpImageDevice *dev)
|
||||
g_clear_object (&self->listener);
|
||||
g_clear_object (&self->connection);
|
||||
|
||||
fpi_image_device_close_complete (dev, NULL);
|
||||
/* Delay result to open up the possibility of testing race conditions. */
|
||||
fpi_device_add_timeout (FP_DEVICE (dev), 100, (FpTimeoutFunc) fpi_image_device_close_complete, NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user