* [PATCH BlueZ 1/1] mesh: Set node ID for a newly provisioned node
@ 2019-03-08 22:56 Inga Stotland
2019-03-11 22:19 ` Gix, Brian
0 siblings, 1 reply; 2+ messages in thread
From: Inga Stotland @ 2019-03-08 22:56 UTC (permalink / raw)
To: linux-bluetooth; +Cc: brian.gix, Inga Stotland
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ 1/1] mesh: Set node ID for a newly provisioned node
2019-03-08 22:56 [PATCH BlueZ 1/1] mesh: Set node ID for a newly provisioned node Inga Stotland
@ 2019-03-11 22:19 ` Gix, Brian
0 siblings, 0 replies; 2+ messages in thread
From: Gix, Brian @ 2019-03-11 22:19 UTC (permalink / raw)
To: linux-bluetooth, Stotland, Inga
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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-11 22:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-08 22:56 [PATCH BlueZ 1/1] mesh: Set node ID for a newly provisioned node Inga Stotland
2019-03-11 22:19 ` Gix, Brian
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.