Bluetooth: Mesh: fix SRPL clearing

If len=0 then `primary` address should be cleared.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
This commit is contained in:
Krzysztof Kopyściński 2023-05-18 10:42:21 +02:00 committed by Carles Cufí
commit 61cf1bb9e4

View file

@ -67,7 +67,7 @@ static int item_clear(struct bt_mesh_model *mod,
return -EINVAL; return -EINVAL;
} }
for (int i = 0; i < len; i++) { for (int i = 0; i < len || i == 0; i++) {
bt_mesh_srpl_entry_clear(primary + i); bt_mesh_srpl_entry_clear(primary + i);
} }