diff options
author | Matthias Bolte <matthias@tinkerforge.com> | 2019-12-13 18:05:08 +0100 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2020-01-02 18:54:59 -0800 |
commit | 6d037d0625a1e8a68d6bcd0f9f35f9026f97b2bd (patch) | |
tree | 861ab49215dbb72e4c22bfbe277d0767246ed8f2 /libusb/os/windows_nt_common.c | |
parent | f67f065709c948d2e29150ea2a3d9441a2609f36 (diff) | |
download | libusb-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>
Diffstat (limited to 'libusb/os/windows_nt_common.c')
-rw-r--r-- | libusb/os/windows_nt_common.c | 1 |
1 files changed, 1 insertions, 0 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; |