Skip to content

Conversation

@jthm-ot
Copy link
Contributor

@jthm-ot jthm-ot commented Nov 15, 2024

When disconnected only the first empty slot in the disconnected_handles array should be updated.

When disconnected only the first empty slot in the disconnected_handles
array should be updated.

Signed-off-by: Jens Rehhoff Thomsen <[email protected]>
@rugeGerritsen
Copy link
Contributor

Can we add a test for this code path?

Comment on lines +936 to +937

return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For semantic reasons I'd just add a break instead of return, but the result will be the same

@Thalley Thalley added the bug The issue is a bug, or the PR is fixing a bug label Nov 15, 2024
Copy link
Contributor

@joerchan joerchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct to me.

@joerchan
Copy link
Contributor

Can we add a test for this code path?

Worth a test-case, but shouldn't be a requirement for merging this fix.
It is probably not the easiest thing to test.

@Thalley
Copy link
Contributor

Thalley commented Nov 15, 2024

It is probably not the easiest thing to test.

I was thinking the same. It requires not only triggering the issue, but also somehow verifying the correctness. Wouldn't be too hard to do with a unit test though I believe

@nashif nashif merged commit b478ffe into zephyrproject-rtos:main Nov 19, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth bug The issue is a bug, or the PR is fixing a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants