virtual-image: Open window for race during deactivation
This is in order to test corner cases in fprintd.
This commit is contained in:
parent
a63dcc96d5
commit
cb56ddba5b
1 changed files with 11 additions and 0 deletions
|
@ -308,6 +308,15 @@ dev_deinit (FpImageDevice *dev)
|
||||||
fpi_device_add_timeout (FP_DEVICE (dev), 100, (FpTimeoutFunc) fpi_image_device_close_complete, NULL, NULL);
|
fpi_device_add_timeout (FP_DEVICE (dev), 100, (FpTimeoutFunc) fpi_image_device_close_complete, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
dev_deactivate (FpImageDevice *dev)
|
||||||
|
{
|
||||||
|
G_DEBUG_HERE ();
|
||||||
|
|
||||||
|
/* Delay result to open up the possibility of testing race conditions. */
|
||||||
|
fpi_device_add_timeout (FP_DEVICE (dev), 100, (FpTimeoutFunc) fpi_image_device_deactivate_complete, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fpi_device_virtual_image_init (FpDeviceVirtualImage *self)
|
fpi_device_virtual_image_init (FpDeviceVirtualImage *self)
|
||||||
{
|
{
|
||||||
|
@ -331,4 +340,6 @@ fpi_device_virtual_image_class_init (FpDeviceVirtualImageClass *klass)
|
||||||
|
|
||||||
img_class->img_open = dev_init;
|
img_class->img_open = dev_init;
|
||||||
img_class->img_close = dev_deinit;
|
img_class->img_close = dev_deinit;
|
||||||
|
|
||||||
|
img_class->deactivate = dev_deactivate;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue