diff options
author | Victor Toso <victortoso@redhat.com> | 2022-08-19 20:28:42 +0200 |
---|---|---|
committer | Victor Toso <me@victortoso.com> | 2022-10-07 13:47:47 +0000 |
commit | a39a3acc06f76f8a47e6dcc35dc9164aa5b8168b (patch) | |
tree | 6968400270272d7e38fc3a6973bff121627392b8 | |
parent | b3b97a975ba91f64417f942b5a4a5629a41021b9 (diff) |
usb-backend: Fix devices not being enumerated
This patch fixes bad filtering of USB devices.
The logic was introduced for windows clients in commit b838937 but was
moved in 2e19014 and executed also by non windows clients, resulting
in this bug.
Fixes: 2e19014 "usb-redir: isolate usage of libusb and usbredirhost"
Fixes: https://gitlab.freedesktop.org/spice/spice-gtk/-/issues/157
Signed-off-by: Victor Toso <victortoso@redhat.com>
-rw-r--r-- | src/usb-backend.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/usb-backend.c b/src/usb-backend.c index 930ae4e..e4b5579 100644 --- a/src/usb-backend.c +++ b/src/usb-backend.c @@ -122,7 +122,9 @@ static gboolean fill_usb_info(SpiceUsbDevice *dev) get_usb_device_info_from_libusb_device(info, dev->libusb_device); if (info->address == 0xff || /* root hub (HCD) */ +#ifdef G_OS_WIN32 info->address <= 1 || /* root hub or bad address */ +#endif (info->class == LIBUSB_CLASS_HUB) /*hub*/) { return FALSE; } |