Revert "Core: Don't wait for completion if cancel_transfer failed"
authorHans de Goede <hdegoede@redhat.com>
Thu, 20 Jun 2013 10:41:00 +0000 (12:41 +0200)
committerHans de Goede <hdegoede@redhat.com>
Thu, 20 Jun 2013 10:47:35 +0000 (12:47 +0200)
commitcb96ec5b4728a2d1cfc9bdf2c32e9e8c98ed074e
treebee1ed323e6d810829bf8106c2bc499982980219
parent2e5bc1013423812bb9397fce16b7646eb063a148
Revert "Core: Don't wait for completion if cancel_transfer failed"

This reverts commit 2f5023c41d3176e56bf0abc521b7c5f8b1ac46642f5023c4
was an attempt to fix: https://github.com/libusbx/libusbx/issues/76

As seen in: http://libusbx.1081486.n5.nabble.com/Libusbx-devel-libusb-interrupt-transfer-does-not-return-in-case-of-error-td626.html

[372849.680990] [0000275b] libusbx: error [reap_for_handle] reap failed error -1 errno=14
[372849.681752] [0000275b] libusbx: error [handle_events] backend handle_events failed with error -1
[372850.680466] [0000275b] libusbx: warning [handle_timeout] async cancel failed -5 errno=22

The problem begins with reap_for_handle failing with errno == 14, which is
EFAULT. So the real problem is the application passing in an invalid (or too
short) buffer, and thus is an application bug.

The fix masks this problem, but causes the problem of calling
libusb_transfer_free() on a non finished transfer, so it is no good.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Conflicts:
AUTHORS
libusb/version_nano.h
libusb/sync.c
libusb/version_nano.h