From 016d342fab81b2c63dc8992d297483043660fa38 Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Tue, 18 Sep 2018 15:27:14 +0200 Subject: Allow set configuration control requests when using libusb0.sys Closes #473 Signed-off-by: Nathan Hjelm --- libusb/os/windows_winusb.c | 5 +++-- libusb/version_nano.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c index 43b9f1a..41734e2 100644 --- a/libusb/os/windows_winusb.c +++ b/libusb/os/windows_winusb.c @@ -2432,8 +2432,9 @@ static int winusbx_submit_control_transfer(int sub_api, struct usbi_transfer *it transfer_priv->handle = winusb_handle = handle_priv->interface_handle[current_interface].api_handle; overlapped = transfer_priv->pollable_fd.overlapped; - // Sending of set configuration control requests from WinUSB creates issues - if ((LIBUSB_REQ_TYPE(setup->RequestType) == LIBUSB_REQUEST_TYPE_STANDARD) + // Sending of set configuration control requests from WinUSB creates issues, except when using libusb0.sys + if (sub_api != SUB_API_LIBUSB0 + && (LIBUSB_REQ_TYPE(setup->RequestType) == LIBUSB_REQUEST_TYPE_STANDARD) && (setup->Request == LIBUSB_REQUEST_SET_CONFIGURATION)) { if (setup->Value != priv->active_config) { usbi_warn(ctx, "cannot set configuration other than the default one"); diff --git a/libusb/version_nano.h b/libusb/version_nano.h index e65f26a..13b1359 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11356 +#define LIBUSB_NANO 11357 -- cgit v1.2.1