@jwrdegoede I take it back something that i've said in previous comment:
tpriv->usbs is NOT NULL.
The problem is that, no matter if processcompl() succeeds in copying data to
userspace or not, the async was already dequeued, free_async(as) is always
called and so is usb_free_urb(as->urb).
So when libusb_cancel_transfer() returns LIBUSB_ERROR_NOT_FOUND is it not
because tpriv->urbs was NULL (as I've previously assumed) but rather that
kernel can't possibly find this urb with IOCTL_USBFS_DISCARDURB since it was
already removed from async_completed list.
Here is where the logic fails: urb doesn't exist in kernel anymore,
cancel_transfer failed, so there is no point in retrying
libusb_handle_events_completed. There are no events left to be completed.
---
Reply to this email directly or view it on GitHub:
https://github.com/libusbx/libusbx/issues/76#issuecomment-31863882
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel