diff options
author | Frederik Carlier <frederik.carlier@quamotion.mobi> | 2018-09-18 15:27:14 +0200 |
---|---|---|
committer | Nathan Hjelm <hjelmn@me.com> | 2019-04-04 22:31:59 -0600 |
commit | 016d342fab81b2c63dc8992d297483043660fa38 (patch) | |
tree | 6e7332cd64ec67dae3be9b56068bb2fe125c4c12 | |
parent | 070efbb1dd3d5fe03fccaf2ca154ae92c1710e78 (diff) | |
download | libusb-016d342fab81b2c63dc8992d297483043660fa38.tar.gz |
Allow set configuration control requests when using libusb0.sys
Closes #473
Signed-off-by: Nathan Hjelm <hjelmn@me.com>
-rw-r--r-- | libusb/os/windows_winusb.c | 5 | ||||
-rw-r--r-- | 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 |