Skip to content

Commit dcdd450

Browse files
Alex Ciascairlubos
authored andcommitted
[nrf fromtree] bluetooth: BASS: Reject Remove Source when PA is syncing or synced
If a Remove Source request is received while the IUT is in PA sync states INFO_REQ or SYNCED, the request is rejected and the source is not removed. Signed-off-by: Alex Ciascai <alexandru.ciascai@nordicsemi.no> (cherry picked from commit 03ccc9b)
1 parent e94cd0c commit dcdd450

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

subsys/bluetooth/audio/bap_scan_delegator.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,8 +1126,10 @@ static int scan_delegator_rem_src(struct bt_conn *conn,
11261126

11271127
state = &internal_state->state;
11281128

1129-
if (internal_state->pa_sync_requested) {
1130-
LOG_DBG("Cannot remove source ID 0x%02x while PA is synced or syncing",
1129+
if (internal_state->pa_sync_requested ||
1130+
state->pa_sync_state == BT_BAP_PA_STATE_INFO_REQ ||
1131+
state->pa_sync_state == BT_BAP_PA_STATE_SYNCED) {
1132+
LOG_DBG("Cannot remove source ID 0x%02x while PA is syncing or synced",
11311133
state->src_id);
11321134
err = k_mutex_unlock(&internal_state->mutex);
11331135
__ASSERT(err == 0, "Failed to unlock mutex: %d", err);

0 commit comments

Comments
 (0)