From ad950fb0f2a6a4e3085b156cbb5263f1b963c59a Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Mon, 26 Oct 2026 10:00:33 +0100 Subject: [PATCH] Use requested libusb handle in host bulk reads Read from the supplied device handle instead of the global handle, keeping transfers associated with the correct connection. --- usbhostfs_pc/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usbhostfs_pc/main.c b/usbhostfs_pc/main.c index c37d942..7e2ba94 100644 --- a/usbhostfs_pc/main.c +++ b/usbhostfs_pc/main.c @@ -228,7 +228,7 @@ int euid_usb_bulk_read(libusb_device_handle *dev, int ep, char *bytes, int size, V_PRINTF(2, "Bulk Read dev %p, ep 0x%x, bytes %p, size %d, timeout %d\n", dev, ep, bytes, size, timeout); - int ret = libusb_bulk_transfer(usbhdr, ep, (unsigned char*)bytes, size, &rdbytes, timeout); + int ret = libusb_bulk_transfer(dev, ep, (unsigned char*)bytes, size, &rdbytes, timeout); if (!ret) ret = rdbytes;