Skip to content

Commit c7621d7

Browse files
Andrewpinifabiobaltieri
authored andcommitted
Bluetooth: Mesh: Shell: Del CDB node on node reset
Adds feature that deletes the shell CDB node after perfoming a config client reset of another node. Signed-off-by: Anders Storrø <[email protected]>
1 parent cf3b10a commit c7621d7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

subsys/bluetooth/mesh/shell/cfg_cli.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ static int cmd_reset(const struct shell *sh, size_t argc, char *argv[])
3333
return 0;
3434
}
3535

36+
if (IS_ENABLED(CONFIG_BT_MESH_CDB)) {
37+
struct bt_mesh_cdb_node *node = bt_mesh_cdb_node_get(bt_mesh_shell_target_ctx.dst);
38+
39+
if (node) {
40+
bt_mesh_cdb_node_del(node, true);
41+
}
42+
}
43+
3644
shell_print(sh, "Remote node reset complete");
3745

3846
return 0;

0 commit comments

Comments
 (0)