Bluetooth: Mesh: Unassign elem addr on comp unprov

Unassigns all element addresses when unprovisioning the composition
data.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
This commit is contained in:
Anders Storrø 2023-08-14 13:55:23 +02:00 committed by Carles Cufí
commit e588e488e8

View file

@ -949,6 +949,12 @@ void bt_mesh_comp_unprovision(void)
LOG_DBG("");
dev_primary_addr = BT_MESH_ADDR_UNASSIGNED;
for (int i = 0; i < dev_comp->elem_count; i++) {
struct bt_mesh_elem *elem = &dev_comp->elem[i];
elem->addr = BT_MESH_ADDR_UNASSIGNED;
}
}
uint16_t bt_mesh_primary_addr(void)