|
From: Alessio S. <al...@ma...> - 2017-01-12 08:58:41
|
Hello. Suppose I have several devices open with libusb, in particular I have a bunch of libusb_device_handle*. I am listening for hotplug events, and I correctly receive LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT notifications. At this point, I need to libusb_close() the right handle, and also manage in my software that a specific device has left. How to find out which handle needs to be closed? I thought to use libusb_get_device() on all my handles and see if the result matches the libusb_device passed by the callback, but it seems the API won't allow this approach. Any other way? This is the only feature that is missing in my code, libusb has been extremely helpful in every other respect. bye as |