Allow set configuration control requests when using libusb0.sys
authorFrederik Carlier <frederik.carlier@quamotion.mobi>
Tue, 18 Sep 2018 13:27:14 +0000 (15:27 +0200)
committerNathan Hjelm <hjelmn@me.com>
Fri, 5 Apr 2019 04:31:59 +0000 (22:31 -0600)
Closes #473

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
libusb/os/windows_winusb.c
libusb/version_nano.h

index 43b9f1a..41734e2 100644 (file)
@@ -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");
index e65f26a..13b1359 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11356
+#define LIBUSB_NANO 11357