Bluetooth: Host: Fix issue with setting 0/NULL data for PA
bt_le_per_adv_set_data would not accept the ad to be NULL or the ad_len to be 0, making it impossible to set no data (which effectively clears existing data). Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
336d706f52
commit
366ddedeb6
1 changed files with 1 additions and 1 deletions
|
@ -1810,7 +1810,7 @@ int bt_le_per_adv_set_data(const struct bt_le_ext_adv *adv,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!ad_len || !ad) {
|
||||
if (ad_len != 0 && ad == NULL) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue