Skip to content

core: Suppress hotplug events during initial enumeration - #1090

Closed
benzea wants to merge 1 commit into
libusb:masterfrom
benzea:benzea/silence-initial-enumeration
Closed

benzea wants to merge 1 commit into
libusb:masterfrom
benzea:benzea/silence-initial-enumeration

Conversation

@benzea

@benzea benzea commented Mar 15, 2022

Copy link
Copy Markdown

The initial enumeration should not result in hotplug events to be fired.
This is just a convenience though, API users still need to be prepared
to be notified a second time fora device that was plugged in between
libusb_init and libusb_hotplug_register_callback.

This regressed with commit 6929b82 ("Fix segmentation fault in
libusb_init() if usbi_backend.init() fails"). This commit avoids the
mentioned segmentation fault by avoiding to clean up the hotplug code if
it was not yet initialised.

Closes: #1082
Related: #989

The initial enumeration should not result in hotplug events to be fired.
This is just a convenience though, API users still need to be prepared
to be notified a second time fora device that was plugged in between
libusb_init and libusb_hotplug_register_callback.

This regressed with commit 6929b82 ("Fix segmentation fault in
libusb_init() if usbi_backend.init() fails"). This commit avoids the
mentioned segmentation fault by avoiding to clean up the hotplug code if
it was not yet initialised.

Closes: libusb#1082
Related: libusb#989
@mcuee mcuee added the core Related to common codes label Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Related to common codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hotplug enumerate regression in 1.0.25

2 participants