diff options
-rw-r--r-- | libusb/sync.c | 18 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
2 files changed, 9 insertions, 11 deletions
diff --git a/libusb/sync.c b/libusb/sync.c index 55d4376..e115099 100644 --- a/libusb/sync.c +++ b/libusb/sync.c @@ -106,11 +106,10 @@ int API_EXPORTED libusb_control_transfer(libusb_device_handle *dev_handle, if (r < 0) { if (r == LIBUSB_ERROR_INTERRUPTED) continue; - if (libusb_cancel_transfer(transfer) == LIBUSB_SUCCESS) { - while (!completed) - if (libusb_handle_events_completed(HANDLE_CTX(dev_handle), &completed) < 0) - break; - } + libusb_cancel_transfer(transfer); + while (!completed) + if (libusb_handle_events_completed(HANDLE_CTX(dev_handle), &completed) < 0) + break; libusb_free_transfer(transfer); return r; } @@ -184,11 +183,10 @@ static int do_sync_bulk_transfer(struct libusb_device_handle *dev_handle, if (r < 0) { if (r == LIBUSB_ERROR_INTERRUPTED) continue; - if (libusb_cancel_transfer(transfer) == LIBUSB_SUCCESS) { - while (!completed) - if (libusb_handle_events_completed(HANDLE_CTX(dev_handle), &completed) < 0) - break; - } + libusb_cancel_transfer(transfer); + while (!completed) + if (libusb_handle_events_completed(HANDLE_CTX(dev_handle), &completed) < 0) + break; libusb_free_transfer(transfer); return r; } diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 9bc6da8..c081b38 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10750 +#define LIBUSB_NANO 10751 |