Bluetooth: BAP: Shell: Fix bad err check for PAST sync

If pa_sync_past returns 0 then that means we are ready to
sync to past, and the BT_BAP_PA_STATE_INFO_REQ state should be set.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2024-03-26 14:55:55 +01:00 committed by Anas Nashif
commit 824e352a77

View file

@ -451,7 +451,7 @@ static int cmd_bap_scan_delegator_sync_pa(const struct shell *sh, size_t argc,
shell_info(sh, "Syncing with PAST");
err = pa_sync_past(state->conn, state, state->pa_interval);
if (err != 0) {
if (err == 0) {
err = bt_bap_scan_delegator_set_pa_state(src_id,
BT_BAP_PA_STATE_INFO_REQ);
if (err != 0) {