From 4261cbefc716e49d459426593cef0104482ec43b Mon Sep 17 00:00:00 2001 From: Martin Thierer Date: Wed, 8 Jul 2020 20:47:57 +0200 Subject: [PATCH] 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 --- libusb/os/windows_winusb.c | 2 +- libusb/version_nano.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 @@ static int winusbx_submit_control_transfer(int sub_api, struct usbi_transfer *it && (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 -- 2.34.1