summaryrefslogtreecommitdiff
path: root/libusb/os/windows_winusb.c
diff options
context:
space:
mode:
authorMartin Thierer <mthierer@gmail.com>2020-07-08 20:47:57 +0200
committerChris Dickens <christopher.a.dickens@gmail.com>2020-07-16 13:28:48 -0700
commit4261cbefc716e49d459426593cef0104482ec43b (patch)
tree3709b0605293a631e9de3bd70a28cfd5ebd2840e /libusb/os/windows_winusb.c
parentad0473413edec14805e59599ff537eba0f5b8d33 (diff)
downloadlibusb-4261cbefc716e49d459426593cef0104482ec43b.tar.gz
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>
Diffstat (limited to 'libusb/os/windows_winusb.c')
-rw-r--r--libusb/os/windows_winusb.c2
1 files changed, 1 insertions, 1 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 {