win-usb-dev also uses libusb.
Similar to commit 3e23fff9, set libusb backend to UsbDk.
Without this patch usb devices are not seen by win-usb-dev
(windows clients), when UsbDk driver is installed.

Signed-off-by: Uri Lublin <u...@redhat.com>
---

Additionally I think the code need to check that usbdk driver
is indeed installed before setting the backend.

---
 src/win-usb-dev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c
index fe4cb98..0eaf70b 100644
--- a/src/win-usb-dev.c
+++ b/src/win-usb-dev.c
@@ -197,6 +197,10 @@ g_udev_client_initable_init(GInitable *initable, 
GCancellable *cancellable,
         return FALSE;
     }
 
+#if LIBUSB_API_VERSION >= 0x01000106
+    libusb_set_option(priv->ctx, LIBUSB_OPTION_USE_USBDK);
+#endif
+
     /* get initial device list */
     if (g_udev_client_list_devices(self, &priv->udev_list, err, __FUNCTION__) 
< 0) {
         goto g_udev_client_init_failed;
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to