Bluetooth: Mesh: Reset solicitation settings before calling reset cb
Trigger erasing solicitation settings before calling `bt_mesh_settings_store_pending` and `bt_mesh_prov.reset` callback. The `bt_mesh_settings_store_pending` flushes every settings that is pending to be erased. The `bt_mesh_prov.reset` callback must be called as the last step because a user is free to do anything from this callback including rebooting or reprovisioning the device. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
parent
ffa49a8240
commit
e495876db6
@ -401,6 +401,10 @@ void bt_mesh_reset(void)
|
||||
|
||||
bt_mesh_comp_unprovision();
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_MESH_PROXY_SOLICITATION)) {
|
||||
bt_mesh_sol_reset();
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
|
||||
bt_mesh_settings_store_pending();
|
||||
}
|
||||
@ -408,10 +412,6 @@ void bt_mesh_reset(void)
|
||||
if (IS_ENABLED(CONFIG_BT_MESH_PROV)) {
|
||||
bt_mesh_prov_reset();
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_MESH_PROXY_SOLICITATION)) {
|
||||
bt_mesh_sol_reset();
|
||||
}
|
||||
}
|
||||
|
||||
bool bt_mesh_is_provisioned(void)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user