With the introduction of mesh_config_file_clear() in 4.2.0 the behaviour of mesh_config_clear() was changed such that only a subset of all the file ids handled by the Mesh Config system is cleared.
This contradicts the behaviour described in the API documentation, "Clean up the file area. It removes all stored file entries."
void mesh_config_clear(void)
{
m_emergency_action = true;
FOR_EACH_FILE(p_file)
{
if (MESH_OPT_FIRST_FREE_ID > p_file->id)
{
mesh_config_file_clear(p_file->id);
}
}
}
In the above code the if statement is causing problems as the mesh_config_clear() only considers file ids listed in the MESH_OPT_ enum.
In addition to the above problem, the system requires that all file ids listed in MESH_OPT_ enum is actually used. Especially MESH_OPT_MODEL_FILE_ID is a new file id not used before.