On Mon, 22 Jul 2013, Nathan Hjelm wrote: > > In Linux, when a device connects there are no special notifications for > > each transfer. Pending transfers are automatically cancelled by the > > kernel, and they complete in the usual way but with a status code of > > -ENODEV. In addition, the kernel refuses to accept new transfer > > submissions. > > Ok, so how about this: > > 1) Remove the code from hotplug.c:195-207 since the completion > callbacks are redundant. We will get them from the backend in both > the Linux and OSX case. We can revisit when Windows hotplug support > is added. > > 2) Make libusb_submit_transfer reference the device and > usbi_handle_transfer_completion dereference the device.
That seems reasonable. But you also have to make sure, once you know a device has been disconnected, that you don't accept any more transfers for that device. Maybe the code already does this; I haven't looked. Alan Stern ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel