Skip to content

Bluetooth: TBS: clear pending GTBS notifications on disconnect#104660

Open
Maxzuru wants to merge 1 commit intozephyrproject-rtos:mainfrom
Maxzuru:gtbs_clear_notifications
Open

Bluetooth: TBS: clear pending GTBS notifications on disconnect#104660
Maxzuru wants to merge 1 commit intozephyrproject-rtos:mainfrom
Maxzuru:gtbs_clear_notifications

Conversation

@Maxzuru
Copy link
Contributor

@Maxzuru Maxzuru commented Feb 27, 2026

Add missing notification clearing for the GTBS instance in the disconnected callback.

Fixes #104568

@Maxzuru
Copy link
Contributor Author

Maxzuru commented Feb 27, 2026

Not sure if this line needs to be in the loop in the first place:
const uint8_t conn_index = bt_conn_index(conn);

I would assume it could be at the top and used for both clearing blocks.

Copy link
Contributor

@Thalley Thalley left a comment

Choose a reason for hiding this comment

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

No changes are absolutely needed, but would suggest these to be done

@Maxzuru Maxzuru force-pushed the gtbs_clear_notifications branch from 1a80072 to a1366eb Compare February 27, 2026 12:58
Thalley
Thalley previously approved these changes Feb 27, 2026
Copy link
Contributor

@Thalley Thalley left a comment

Choose a reason for hiding this comment

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

Thanks :)

Comment on lines 381 to 383
err = k_mutex_lock(&gtbs_inst.mutex, MUTEX_TIMEOUT);

if (err != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
err = k_mutex_lock(&gtbs_inst.mutex, MUTEX_TIMEOUT);
if (err != 0) {
err = k_mutex_lock(&gtbs_inst.mutex, MUTEX_TIMEOUT);
if (err != 0) {

Minor

Add missing notification clearing for the GTBS instance
in the disconnected callback.

Fixes zephyrproject-rtos#104568

Signed-off-by: Maximilian Zimmermann <gitmz@posteo.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment