GUdevClient: Do not process USB hotplug events while redirection is in progress
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 <230ffca79de7e6eb3a18fb9f93884325b7f69222@redhat.com>
Signed-off-by: Dmitry Fleytman <f50f56ffad4b379c2a89812e98b14900ef87e9ea@redhat.com>
Acked-by: Jonathon Jongsma <c7254805a17bd5c41e24c3a278fcbf3afcdfb0fa@redhat.com>

fgouget/spice-gtk,fgouget/spice-gtk,flexVDI/spice-gtk,fgouget/spice-gtk,SPICE/spice-gtk,SPICE/spice-gtk,SPICE/spice-gtk,flexVDI/spice-gtk,SPICE/spice-gtk