winusb: setting a non-default config not supported
Just because winusb doesn't seem to support setting a different
configuration, that doesn't mean it's an invalid parameter.
It's generally supported by libusb, just not on this platform.
So return LIBUSB_ERROR_NOT_SUPPORTED instead of
LIBUSB_ERROR_INVALID_PARAM.
Closes #743
Closes #752
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c
index 8ea9697..7ed9de5 100644
--- a/libusb/os/windows_winusb.c
+++ b/libusb/os/windows_winusb.c
@@ -2457,7 +2457,7 @@
&& (setup->Request == LIBUSB_REQUEST_SET_CONFIGURATION)) {
if (setup->Value != priv->active_config) {
usbi_warn(TRANSFER_CTX(transfer), "cannot set configuration other than the default one");
- return LIBUSB_ERROR_INVALID_PARAM;
+ return LIBUSB_ERROR_NOT_SUPPORTED;
}
windows_force_sync_completion(overlapped, 0);
} else {
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index f1ac20f..9f10b11 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11522
+#define LIBUSB_NANO 11523