[PATCH BlueZ 1/1] mesh: Set node ID for a newly provisioned node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux