When a new node is created after successful provisioning, a 4-digit
hex node id needs to be generated and preserved.
---
mesh/storage.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mesh/storage.c b/mesh/storage.c
index fe3102fba..e84c2c933 100644
--- a/mesh/storage.c
+++ b/mesh/storage.c
@@ -546,6 +546,8 @@ bool storage_create_node_config(struct mesh_node *node, void *data)
if (num_tries == 10)
l_error("Failed to generate unique node ID");
+ node_id_set(node, node_id);
+
snprintf(name_buf, PATH_MAX, "%s/%04x", storage_dir, node_id);
/* Create a new directory and node.json file */
--
2.17.2
Applied
On Fri, 2019-03-08 at 14:56 -0800, Inga Stotland wrote:
> When a new node is created after successful provisioning, a 4-digit
> hex node id needs to be generated and preserved.
> ---
> mesh/storage.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mesh/storage.c b/mesh/storage.c
> index fe3102fba..e84c2c933 100644
> --- a/mesh/storage.c
> +++ b/mesh/storage.c
> @@ -546,6 +546,8 @@ bool storage_create_node_config(struct mesh_node *node, void *data)
> if (num_tries == 10)
> l_error("Failed to generate unique node ID");
>
> + node_id_set(node, node_id);
> +
> snprintf(name_buf, PATH_MAX, "%s/%04x", storage_dir, node_id);
>
> /* Create a new directory and node.json file */