diff options
Diffstat (limited to 'libusb/sync.c')
-rw-r--r-- | libusb/sync.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libusb/sync.c b/libusb/sync.c index 55450c4..92e7833 100644 --- a/libusb/sync.c +++ b/libusb/sync.c @@ -102,11 +102,11 @@ API_EXPORTED int libusb_control_transfer(libusb_device_handle *dev_handle, } while (!completed) { - r = libusb_handle_events(); + r = libusb_handle_events(HANDLE_CTX(dev_handle)); if (r < 0) { libusb_cancel_transfer(transfer); while (!completed) - if (libusb_handle_events() < 0) + if (libusb_handle_events(HANDLE_CTX(dev_handle)) < 0) break; libusb_free_transfer(transfer); return r; @@ -131,7 +131,8 @@ API_EXPORTED int libusb_control_transfer(libusb_device_handle *dev_handle, r = LIBUSB_ERROR_NO_DEVICE; break; default: - usbi_warn("unrecognised status code %d", transfer->status); + usbi_warn(HANDLE_CTX(dev_handle), + "unrecognised status code %d", transfer->status); r = LIBUSB_ERROR_OTHER; } @@ -169,11 +170,11 @@ static int do_sync_bulk_transfer(struct libusb_device_handle *dev_handle, } while (!completed) { - r = libusb_handle_events(); + r = libusb_handle_events(HANDLE_CTX(dev_handle)); if (r < 0) { libusb_cancel_transfer(transfer); while (!completed) - if (libusb_handle_events() < 0) + if (libusb_handle_events(HANDLE_CTX(dev_handle)) < 0) break; libusb_free_transfer(transfer); return r; @@ -198,7 +199,8 @@ static int do_sync_bulk_transfer(struct libusb_device_handle *dev_handle, r = LIBUSB_ERROR_NO_DEVICE; break; default: - usbi_warn("unrecognised status code %d", transfer->status); + usbi_warn(HANDLE_CTX(dev_handle), + "unrecognised status code %d", transfer->status); r = LIBUSB_ERROR_OTHER; } |