Skip to content

Commit 7616520

Browse files
author
Max Emde
committed
Bluetooth: BAP: Update encrypt_state when BIG synced after bad code
- When encrypt_state in a receive state of the scan delegator is BT_BAP_BIG_ENC_STATE_BAD_CODE, make sure that on synchronization encrypt_state is updated to BT_BAP_BIG_ENC_STATE_DEC, as this implies that a correct code was provided, so that the broadcast assistant is not asked for a correct code any longer. Signed-off-by: Max Emde <[email protected]>
1 parent 785d0bb commit 7616520

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

subsys/bluetooth/audio/bap_broadcast_sink.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ static void update_recv_state_big_synced(const struct bt_bap_broadcast_sink *sin
122122
subgroup_param->bis_sync = sink_subgroup->bis_indexes & sink->indexes_bitfield;
123123
}
124124

125-
if (recv_state->encrypt_state == BT_BAP_BIG_ENC_STATE_BCODE_REQ) {
125+
if (recv_state->encrypt_state == BT_BAP_BIG_ENC_STATE_BCODE_REQ ||
126+
recv_state->encrypt_state == BT_BAP_BIG_ENC_STATE_BAD_CODE) {
126127
mod_src_param.encrypt_state = BT_BAP_BIG_ENC_STATE_DEC;
127128
} else {
128129
mod_src_param.encrypt_state = recv_state->encrypt_state;

0 commit comments

Comments
 (0)