Skip to contentSkip to conversation

mesh: Fix storage init of Friend and LPN features

PATCH Applied Inga Stotland 2 participants 2 messages Jul 25, 2019 – Jul 26, 2019 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mesh: Fix storage init of Friend and LPN features

This fixes a typo in mesh-config-json.c when Friend feature was initialized twice and LPN was not initialized at all.

---
 mesh/mesh-config-json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mesh/mesh-config-json.c +1 -1
index 75015e607..e3baf5dc6 100644
@@ -1191,7 +1191,7 @@ static void parse_features(json_object *jconfig, struct mesh_config_node *node)
 	if (json_object_object_get_ex(jconfig, "lowPower", &jvalue)) {
 		mode = get_mode(jvalue);
 		if (mode <= MESH_MODE_UNSUPPORTED)
-			node->modes.friend = mode;
+			node->modes.lpn = mode;
 	}
 
 	if (json_object_object_get_ex(jconfig, "beacon", &jvalue)) {
Signature · 1 line
2.21.0
Applied
#1 lore raw

Applied

Quoted 19 lines · Inga Stotland

This fixes a typo in mesh-config-json.c when Friend feature was initialized twice and LPN was not initialized at all.

---
 mesh/mesh-config-json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mesh/mesh-config-json.c +1 -1
index 75015e607..e3baf5dc6 100644
@@ -1191,7 +1191,7 @@ static void parse_features(json_object *jconfig, struct mesh_config_node *node)
 	if (json_object_object_get_ex(jconfig, "lowPower", &jvalue)) {
 		mode = get_mode(jvalue);
 		if (mode <= MESH_MODE_UNSUPPORTED)
-			node->modes.friend = mode;
+			node->modes.lpn = mode;
 	}
 
 	if (json_object_object_get_ex(jconfig, "beacon", &jvalue)) {