Bluetooth: Audio: Shell: clear static buffers for ad data

The buffers for the PBP advertising data as well as the
buffers for the BASE periodic advertising data were
not cleared, so calling the functions multiple times
would simply append the data rather than just setting
the new data.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2024-03-26 13:55:38 +01:00 committed by Anas Nashif
commit 8acada0608
3 changed files with 6 additions and 0 deletions

View file

@ -48,6 +48,8 @@ size_t pbp_ad_data_add(struct bt_data data[], size_t data_size)
{
int err;
net_buf_simple_reset(&pbp_ad_buf);
err = bt_pbp_get_announcement(pba_metadata,
ARRAY_SIZE(pba_metadata),
pbp_features,