Skip to contentSkip to conversation

mesh: Fix bug with adding more than one app key

PATCH Applied Brian Gix 1 participant 2 messages Mar 11, 2019 Bluetooth drivers

lore
Share & tools
lore

Brian Gix

author
#0 lore raw

PATCH v2 1/1 mesh: Fix bug with adding more than one app key

Fixed problem where if the appKeys array already exists, that new add key requests were rejected.

---
 mesh/mesh-db.c | 2 --
 1 file changed, 2 deletions(-)
mesh/mesh-db.c +0 -2
index 2dc13cd65..d5d19d52f 100644
@@ -533,8 +533,6 @@ bool mesh_db_app_key_add(json_object *jobj, uint16_t net_idx, uint16_t app_idx,
 	char buf[5];
 
 	json_object_object_get_ex(jobj, "appKeys", &jarray);
-	if (jarray)
-		return false;
 
 	if (jarray)
 		jentry = get_key_object(jarray, app_idx);
Signature · 1 line
2.14.5
author Applied
#1 lore raw

Applied

Quoted 19 lines · Brian Gix

Fixed problem where if the appKeys array already exists, that new add key requests were rejected.

---
 mesh/mesh-db.c | 2 --
 1 file changed, 2 deletions(-)
mesh/mesh-db.c +0 -2
index 2dc13cd65..d5d19d52f 100644
@@ -533,8 +533,6 @@ bool mesh_db_app_key_add(json_object *jobj, uint16_t net_idx, uint16_t app_idx,
 	char buf[5];
 
 	json_object_object_get_ex(jobj, "appKeys", &jarray);
-	if (jarray)
-		return false;
 
 	if (jarray)
 		jentry = get_key_object(jarray, app_idx);