-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Bluetooth: host: Fix bug in disconnected handling #81433
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
Conversation
When disconnected only the first empty slot in the disconnected_handles array should be updated. Signed-off-by: Jens Rehhoff Thomsen <[email protected]>
|
Can we add a test for this code path? |
|
|
||
| return; |
There was a problem hiding this comment.
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
joerchan
left a comment
There was a problem hiding this 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.
Worth a test-case, but shouldn't be a requirement for merging this fix. |
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 |
When disconnected only the first empty slot in the disconnected_handles array should be updated.