Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ble_hs_stop.c: Prevent duplicate entries in ble_hs_stop_listeners. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robert-hh
Copy link

Under circumstances not fully clear sometimes duplicate list elements are added to the list ble_hs_stop_listeners. If that happens, the function ble_hs_stop_done() never terminates.
This PR adds a check into ble_hs_stop_register_listener() if a to-be-added node/sublist already exist in the list and the it does not add this element. While this is anyhow a good test, it should not be needed in the MicroPython environment.

Under circumstances not fully clear sometimes duplicate list elements
are added to the `list ble_hs_stop_listeners`. If that happens, the
function `ble_hs_stop_done()` never terminates.
This PR adds a check into `ble_hs_stop_register_listener()` if
a to-be-added node/sublist already exist in the list and the it does
not add this element. While this is anyhow a good test, it should not
be needed in the MicroPython environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant