tools/mesh-cfgclient: Add group parent address for DB compliance
authorInga Stotland <inga.stotland@intel.com>
Thu, 23 Sep 2021 03:25:58 +0000 (20:25 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:37 +0000 (19:08 +0530)
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tools/mesh/mesh-db.c

index 7de36af..ed26003 100644 (file)
@@ -1592,6 +1592,10 @@ bool mesh_db_add_group(struct mesh_group *grp)
                        goto fail;
        }
 
+       /* Initialize parent group to unassigned address for now*/
+       if (!write_uint16_hex(jgroup, "parentAddress", UNASSIGNED_ADDRESS))
+               goto fail;
+
        json_object_array_add(jgroups, jgroup);
 
        return save_config();