Bluetooth: BAP: Release read_buf_sem in receive_state_updated earlier

The semaphore should be returned before calling the application
callbacks.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2025-03-17 15:12:48 +01:00 committed by Benjamin Cabé
commit ff9a9fe031

View file

@ -245,13 +245,13 @@ static void receive_state_updated(struct bt_conn *conn,
bt_debug_dump_recv_state(internal_state);
net_buf_put_recv_state(internal_state);
bass_notify_receive_state(internal_state);
k_sem_give(&read_buf_sem);
if (scan_delegator_cbs != NULL &&
scan_delegator_cbs->recv_state_updated != NULL) {
scan_delegator_cbs->recv_state_updated(conn,
&internal_state->state);
}
k_sem_give(&read_buf_sem);
}
static void bis_sync_request_updated(struct bt_conn *conn,