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

Correct ble_serial_connected() when BLE workflow was never started #9679

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Oct 3, 2024

ble_serial_connected() was checking _tx_packet_buffer.conn_handle as an indicator of whether BLE was connected. But that value was not initialized when BLE hadn't started up at all, and so ble_serial_connected() was returning true incorrectly in that case. The check should have also included a check for deinited. I added that and refactored it into a common-hal routine.

I asked the issue authors to test. It fixed the problem for at least one of them: #9626 (comment)

@dhalbert dhalbert requested a review from tannewt October 4, 2024 02:27
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@tannewt tannewt merged commit 7f14b9c into adafruit:main Oct 4, 2024
558 checks passed
@dhalbert dhalbert deleted the fix-ble-serial-check branch October 4, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants