mesh: Don't add config server when loading from storage
PATCH 1/1 mesh: Don't add config server when loading from storage
Adding a sonfig server model when loading from storage is unnecessary, since the daemon-generated stored configuration always contains config server model.
This also fixes a memory leak caused by bad parameters passed to mesh_model_add()
--- mesh/node.c | 3 --- 1 file changed, 3 deletions(-)
mesh/node.c +0 -3
@@ -353,9 +353,6 @@ static bool add_elements_from_storage(struct mesh_node *node,if (!add_element_from_storage (node, entry->data))return false; -/* Add configuration server model on the primary element */ -mesh_model_add (node,PRIMARY_ELE_IDX ,CONFIG_SRV_MODEL ,NULL ); -return true; }
Signature · 1 line
2.26.2
Gix, Brian
AppliedApplied
Quoted 23 lines · Inga Stotland
Adding a sonfig server model when loading from storage is unnecessary, since the daemon-generated stored configuration always contains config server model.
This also fixes a memory leak caused by bad parameters passed tomesh_model_add()--- mesh/node.c | 3 --- 1 file changed, 3 deletions(-)mesh/node.c +0
-3@@ -353,9 +353,6 @@ static bool add_elements_from_storage(struct mesh_node *node,if (!add_element_from_storage (node, entry->data))return false; -/* Add configuration server model on the primary element */ -mesh_model_add (node,PRIMARY_ELE_IDX ,CONFIG_SRV_MODEL ,NULL ); -return true; }