diff options
author | Sebastian von Ohr <vonohr@smaract.com> | 2020-04-28 16:28:27 +0200 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2020-04-30 11:50:49 -0700 |
commit | 26611eaa494ed9e077b5b0e1f999f5ae377de958 (patch) | |
tree | cdd67e816529f5212b5260286d4f7338756bd339 /libusb/os/windows_common.c | |
parent | e2be556bd262cd260bebe3fc724509692537eba3 (diff) | |
download | libusb-26611eaa494ed9e077b5b0e1f999f5ae377de958.tar.gz |
Windows: Translate ERROR_NO_SUCH_DEVICE to LIBUSB_TRANSFER_NO_DEVICE
Windows SDK 10.0.18362.0 adds a new error code ERROR_NO_SUCH_DEVICE
which is returned when the device is disconnected.
Closes #721, Closes #722
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'libusb/os/windows_common.c')
-rw-r--r-- | libusb/os/windows_common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libusb/os/windows_common.c b/libusb/os/windows_common.c index d8f1e38..ccf20b2 100644 --- a/libusb/os/windows_common.c +++ b/libusb/os/windows_common.c @@ -430,6 +430,7 @@ static void windows_transfer_callback(const struct windows_backend *backend, break; case ERROR_FILE_NOT_FOUND: case ERROR_DEVICE_NOT_CONNECTED: + case ERROR_NO_SUCH_DEVICE: usbi_dbg("detected device removed"); status = LIBUSB_TRANSFER_NO_DEVICE; break; |