aboutsummaryrefslogtreecommitdiffstats
path: root/libusb
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-03-26 21:37:03 +0100
committerPete Batard <pete@akeo.ie>2012-03-26 21:41:50 +0100
commitf18a081dd742f332511101a5dc715bd6b16cb92a (patch)
tree29cede2a178b6dde4092d4e03d516640f9753ffa /libusb
parentd041159a1720c14568154c07f94b01340b991417 (diff)
downloadandroid_external_libusbx-f18a081dd742f332511101a5dc715bd6b16cb92a.tar.gz
android_external_libusbx-f18a081dd742f332511101a5dc715bd6b16cb92a.tar.bz2
android_external_libusbx-f18a081dd742f332511101a5dc715bd6b16cb92a.zip
Linux: Don't print errors when cancel_transfer fails with NOT_FOUND
* Under some cricumstances, LIBUSB_ERROR_NOT_FOUND is an expected return value for cancel_transfer so printing an error is undesirable.
Diffstat (limited to 'libusb')
-rw-r--r--libusb/io.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libusb/io.c b/libusb/io.c
index bb04a8f..c9df0cf 100644
--- a/libusb/io.c
+++ b/libusb/io.c
@@ -1353,8 +1353,11 @@ int API_EXPORTED libusb_cancel_transfer(struct libusb_transfer *transfer)
usbi_mutex_lock(&itransfer->lock);
r = usbi_backend->cancel_transfer(itransfer);
if (r < 0) {
- usbi_err(TRANSFER_CTX(transfer),
- "cancel transfer failed error %d", r);
+ if (r != LIBUSB_ERROR_NOT_FOUND)
+ usbi_err(TRANSFER_CTX(transfer),
+ "cancel transfer failed error %d", r);
+ else
+ usbi_dbg("cancel transfer failed error %d", r);
if (r == LIBUSB_ERROR_NO_DEVICE)
itransfer->flags |= USBI_TRANSFER_DEVICE_DISAPPEARED;