Skip to content

Commit ff9a9fe

Browse files
Thalleykartben
authored andcommitted
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>
1 parent f8d1d35 commit ff9a9fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

subsys/bluetooth/audio/bap_scan_delegator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ static void receive_state_updated(struct bt_conn *conn,
245245
bt_debug_dump_recv_state(internal_state);
246246
net_buf_put_recv_state(internal_state);
247247
bass_notify_receive_state(internal_state);
248+
k_sem_give(&read_buf_sem);
249+
248250
if (scan_delegator_cbs != NULL &&
249251
scan_delegator_cbs->recv_state_updated != NULL) {
250252
scan_delegator_cbs->recv_state_updated(conn,
251253
&internal_state->state);
252254
}
253-
254-
k_sem_give(&read_buf_sem);
255255
}
256256

257257
static void bis_sync_request_updated(struct bt_conn *conn,

0 commit comments

Comments
 (0)