diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-03-26 21:37:03 +0100 |
---|---|---|
committer | Pete Batard <pete@akeo.ie> | 2012-03-26 21:41:50 +0100 |
commit | f18a081dd742f332511101a5dc715bd6b16cb92a (patch) | |
tree | 29cede2a178b6dde4092d4e03d516640f9753ffa /libusb | |
parent | d041159a1720c14568154c07f94b01340b991417 (diff) | |
download | android_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.c | 7 |
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; |