summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Bolte <matthias@tinkerforge.com>2019-12-13 18:05:08 +0100
committerChris Dickens <christopher.a.dickens@gmail.com>2020-01-02 18:54:59 -0800
commit6d037d0625a1e8a68d6bcd0f9f35f9026f97b2bd (patch)
tree861ab49215dbb72e4c22bfbe277d0767246ed8f2
parentf67f065709c948d2e29150ea2a3d9441a2609f36 (diff)
downloadlibusb-6d037d0625a1e8a68d6bcd0f9f35f9026f97b2bd.tar.gz
windows: Translate ERROR_DEVICE_NOT_CONNECTED to LIBUSB_TRANSFER_NO_DEVICE
Windows 7 reports error code ERROR_DEVICE_NOT_CONNECTED if transters fail due to unplugging the device. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
-rw-r--r--libusb/os/windows_nt_common.c1
-rw-r--r--libusb/version_nano.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/libusb/os/windows_nt_common.c b/libusb/os/windows_nt_common.c
index 54338a7..9c584fe 100644
--- a/libusb/os/windows_nt_common.c
+++ b/libusb/os/windows_nt_common.c
@@ -563,6 +563,7 @@ static void windows_transfer_callback(const struct windows_backend *backend,
status = LIBUSB_TRANSFER_CANCELLED;
break;
case ERROR_FILE_NOT_FOUND:
+ case ERROR_DEVICE_NOT_CONNECTED:
usbi_dbg("detected device removed");
status = LIBUSB_TRANSFER_NO_DEVICE;
break;
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 3b9b7ee..87f9e69 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11417
+#define LIBUSB_NANO 11418