summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2013-02-02 01:42:06 +1100
committerPete Batard <pete@akeo.ie>2013-02-02 00:09:50 +0000
commitaa482f89ac2fd157fb039bf4518a951aac35acdc (patch)
treeb460502a1cd965d4774d993616991618b9a4edcf
parent6a445e6a0c07d05475cbb20632dba9297e372b43 (diff)
downloadlibusb-aa482f89ac2fd157fb039bf4518a951aac35acdc.tar.gz
Windows: Fixed bug in interface autoclaim
* Bug was introduced in f2b19e4a32c1445f4fea06beca61e8c7e7757950 * Closes #78 * Closes #80
-rw-r--r--AUTHORS1
-rw-r--r--libusb/os/windows_usb.c4
-rw-r--r--libusb/version_nano.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/AUTHORS b/AUTHORS
index 88c7ab5..8fd762e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -17,6 +17,7 @@ Anthony Clay
Artem Egorkine
Aurelien Jarno
Bastien Nocera
+Benjamin Dobell
Dave Camarillo
David Engraf
David Moore
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c
index 7b459a1..ee7a9f1 100644
--- a/libusb/os/windows_usb.c
+++ b/libusb/os/windows_usb.c
@@ -2732,11 +2732,11 @@ static int winusbx_claim_interface(int sub_api, struct libusb_device_handle *dev
// must first claim the first interface before you claim the others
if ((winusb_handle == 0) || (winusb_handle == INVALID_HANDLE_VALUE)) {
file_handle = handle_priv->interface_handle[0].dev_handle;
- if (!WinUSBX[sub_api].Initialize(file_handle, &winusb_handle)) {
+ if (WinUSBX[sub_api].Initialize(file_handle, &winusb_handle)) {
handle_priv->interface_handle[0].api_handle = winusb_handle;
usbi_warn(ctx, "auto-claimed interface 0 (required to claim %d with WinUSB)", iface);
} else {
- usbi_warn(ctx, "failed to auto-claim interface 0 (required to claim %d with WinUSB)", iface);
+ usbi_warn(ctx, "failed to auto-claim interface 0 (required to claim %d with WinUSB): %s", iface, windows_error_str(0));
return LIBUSB_ERROR_ACCESS;
}
}
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 64f61c5..bc838f0 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10600
+#define LIBUSB_NANO 10601