virtual-image: Add command to trigger device removal

This is primarily useful for fprintd testing.
This commit is contained in:
Benjamin Berg 2020-11-17 14:46:46 +01:00
parent 280f916ace
commit 21ee241f0c

View file

@ -171,6 +171,11 @@ recv_image_hdr_recv_cb (GObject *source_object,
!!self->recv_img_hdr[1]); !!self->recv_img_hdr[1]);
break; break;
case -5:
/* -5 causes the device to disappear (no further data) */
fpi_device_remove (FP_DEVICE (self));
break;
default: default:
/* disconnect client, it didn't play fair */ /* disconnect client, it didn't play fair */
g_io_stream_close (G_IO_STREAM (self->connection), NULL, NULL); g_io_stream_close (G_IO_STREAM (self->connection), NULL, NULL);