diff options
-rw-r--r-- | libusb/sync.c | 8 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/libusb/sync.c b/libusb/sync.c index a609f65..70942ac 100644 --- a/libusb/sync.c +++ b/libusb/sync.c @@ -1,6 +1,9 @@ +/* -*- Mode: C; indent-tabs-mode:t ; c-basic-offset:8 -*- */ /* * Synchronous I/O functions for libusb * Copyright © 2007-2008 Daniel Drake <dsd@gentoo.org> + * Copyright © 2019 Nathan Hjelm <hjelmn@cs.unm.edu> + * Copyright © 2019 Google LLC. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -57,6 +60,11 @@ static void sync_transfer_wait_for_completion(struct libusb_transfer *transfer) libusb_cancel_transfer(transfer); continue; } + if (NULL == transfer->dev_handle) { + /* transfer completion after libusb_close() */ + transfer->status = LIBUSB_ERROR_NO_DEVICE; + *completed = 1; + } } } diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 8aa1efc..1ff7ca7 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11389 +#define LIBUSB_NANO 11390 |