Skip to content

Commit 44d5e83

Browse files
Thalleynashif
authored andcommitted
tests: Bluetooth: Fix use of BTP PAST event in BSIM
The is_valid_gap_packet_len check for btp_gap_ev_periodic_transfer_received_ev referenced a field that was recently removed. Modify the check to just check the size, as the event now has not variable length fields. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 2c5c0e2 commit 44d5e83

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tests/bsim/bluetooth/tester/src/bsim_btp.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,16 +191,7 @@ static bool is_valid_gap_packet_len(const struct btp_hdr *hdr, struct net_buf_si
191191
return false;
192192
}
193193
case BTP_GAP_EV_PERIODIC_TRANSFER_RECEIVED:
194-
if (hdr->len >= sizeof(struct btp_gap_ev_periodic_transfer_received_ev)) {
195-
const struct btp_gap_ev_periodic_transfer_received_ev *ev =
196-
net_buf_simple_pull_mem(
197-
buf_simple,
198-
sizeof(struct btp_gap_ev_periodic_transfer_received_ev));
199-
200-
return ev->data_len == buf_simple->len;
201-
} else {
202-
return false;
203-
}
194+
return buf_simple->len == sizeof(struct btp_gap_ev_periodic_transfer_received_ev);
204195
default:
205196
LOG_ERR("Unhandled opcode 0x%02X", hdr->opcode);
206197
return false;

0 commit comments

Comments
 (0)