Commit Graph

4 Commits

Author SHA1 Message Date
Kirill Moizik
b4b4187813 GUdevClient: Do not process USB hotplug events while redirection is in progress
USB redirection flow on Windows includes a number of reset requests issued
to the port that hosts the device deing redirected.

Each port reset emulates device removal and reinsertion and produces
corresponding hotplug events and a number of device list updates on
different levels of USB stack and USB redirection engine.

As a result, queriyng USB device list performed by spice-gtk's hotplug
event handler may return inconsistent results if performed in parallel
to redirection flow.

This patch suppresses handling of USB hotplug events during redirection
and injects a simulated hotplug event after redirection completion
in order to properly process real device list changes in case they
happened during the redirection flow.

Signed-off-by: Kirill Moizik <kmoizik@redhat.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-24 11:00:01 -05:00
Kirill Moizik
4ec353ea4c win-usb-dev: Track device redirection operations in progress
This commit introduces redirecting property of GUdevClient

This property indicates when a redirection operation
is in progress on a device. It's set back to FALSE
once the device is fully redirected to the guest.

Signed-off-by: Kirill Moizik <kmoizik@redhat.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-24 11:00:01 -05:00
Dmitry Fleytman
2a01b4a041 win-usb-dev: Fix device (un)plug notification handler
This patch fixes device list change notification handing
logic for cases when more than one device being plugged
or unplugged simultaneously.

The simplest way to reproduce the problematic scenario
is (un)plugging of a usb HUB with a few devices inserted.

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-03-24 11:00:01 -05:00
Marc-André Lureau
caf28401ca Move gtk/ -> src/
For historical reasons, the code was placed under gtk/ subdirectory.
If it was always bugging you, bug no more!
2015-06-08 17:38:58 +02:00