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

Bluetooth: BAP: UC: Fix call to bt_gatt_get_mtu in notify #69080

Merged

Conversation

Thalley
Copy link
Collaborator

@Thalley Thalley commented Feb 16, 2024

In the unicast_client_ep_notify we would always call bt_gatt_get_mtu, regardless of whether data == NULL.

When there is a disconnection, the notify callbacks are called with data == NULL to indicate a unsubscription. In the case of the unicast client, this would also trigger calls to bt_gatt_get_mtu when there is a disconnect, which in turn would trigger a warning that ATT is not connected.

Postponing the call to bt_gatt_get_mtu fixes this.

In the unicast_client_ep_notify we would always call
bt_gatt_get_mtu, regardless of whether data == NULL.

When there is a disconnection, the notify callbacks are
called with data == NULL to indicate a unsubscription.
In the case of the unicast client, this would also trigger
calls to bt_gatt_get_mtu when there is a disconnect, which
in turn would trigger a warning that ATT is not connected.

Postponing the call to bt_gatt_get_mtu fixes this.

Signed-off-by: Emil Gydesen <[email protected]>
@Thalley Thalley added bug The issue is a bug, or the PR is fixing a bug Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels Feb 16, 2024
@Thalley Thalley added this to the v3.6.0 milestone Feb 16, 2024
@henrikbrixandersen henrikbrixandersen merged commit acd1e89 into zephyrproject-rtos:main Feb 16, 2024
28 checks passed
@Thalley Thalley deleted the unicast_client_log_wrn_fix branch February 19, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Audio area: Bluetooth bug The issue is a bug, or the PR is fixing a bug Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants