Files
archived-ext-libusb/libusb
Tormod Volden 6c41069e77 examples/hotplugtest: Allow multiple devices attaching
If no device ID is specified, and for instance a hub is plugged, many
devices will be attached (and later detached) at the same time. The old
code counting only 2 events would then exit prematurely.

By counting attach and detach events separately, we preserve the old
behaviour in the single-device case, but also allow more complex
sequences to be handled in a way that mostly appears intuitive.

This is not fool-proof, and we can still end up leaving after a surprise
detachment of a "pre-existing" device while we have one of the "new"
devices open. In this case print a warning.

References #1455

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2025-06-09 15:43:16 +02:00
..
2024-05-26 23:10:24 +02:00
2025-05-16 00:33:40 +02:00
2025-06-01 20:33:14 +02:00