Commit 3ef1b045 authored by Andries Kruithof's avatar Andries Kruithof Committed by Carles Cufi
Browse files

Bluetooth: audio: fix bug in scan delegator sync



In the scan delegator when modifying the source we only want to
send a sync request to the upper layers if we are not yet synced,
and not also on a state change

Note that without this change the babblesim test for long writes
will fail

Signed-off-by: default avatarAndries Kruithof <andries.kruithof@nordicsemi.no>

Scan del bugfix

Signed-off-by: default avatarAndries Kruithof <andries.kruithof@nordicsemi.no>
parent c5dcc1a4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -807,7 +807,7 @@ static int scan_delegator_mod_src(struct bt_conn *conn,
	 * we are not already synced to the device
	 */
	if (pa_sync != BT_BAP_BASS_PA_REQ_NO_SYNC &&
	    (state_changed || state->pa_sync_state != BT_BAP_PA_STATE_SYNCED)) {
	    state->pa_sync_state != BT_BAP_PA_STATE_SYNCED) {
		const int err = pa_sync_request(conn, state, pa_sync,
						pa_interval);