Diff between 725a72ea654c2966f6d220ee39bbfca0369f1171 and 2874aeb4d05679b1d96009d84a13882ca34c3eac

Changed Files

File Additions Deletions Status
mesh/manager.c +1 -1 modified
mesh/mesh.c +1 -1 modified
mesh/node.c +5 -4 modified
mesh/node.h +3 -1 modified
mesh/provision.h +2 -2 modified
mesh/remprv-server.c +1 -1 modified

Full Patch

diff --git a/mesh/manager.c b/mesh/manager.c
index 63551b4..3786f7a 100644
--- a/mesh/manager.c
+++ b/mesh/manager.c
@@ -177,7 +177,7 @@ static void send_add_failed(const char *owner, const char *path,
 }
 
 static bool add_cmplt(void *user_data, uint8_t status,
-					struct mesh_prov_node_info *info)
+					const struct mesh_prov_node_info *info)
 {
 	struct prov_remote_data *pending = user_data;
 	struct mesh_node *node = pending->node;
diff --git a/mesh/mesh.c b/mesh/mesh.c
index 50059ad..354aaba 100644
--- a/mesh/mesh.c
+++ b/mesh/mesh.c
@@ -455,7 +455,7 @@ static void prov_join_complete_reply_cb(struct l_dbus_message *msg,
 }
 
 static bool prov_complete_cb(void *user_data, uint8_t status,
-					struct mesh_prov_node_info *info)
+					const struct mesh_prov_node_info *info)
 {
 	struct l_dbus *dbus = dbus_get_bus();
 	struct l_dbus_message *msg;
diff --git a/mesh/node.c b/mesh/node.c
index a858147..65161b7 100644
--- a/mesh/node.c
+++ b/mesh/node.c
@@ -1412,8 +1412,9 @@ static void save_pages(void *data, void *user_data)
 }
 
 static bool add_local_node(struct mesh_node *node, uint16_t unicast, bool kr,
-				bool ivu, uint32_t iv_idx, uint8_t dev_key[16],
-				uint16_t net_key_idx, uint8_t net_key[16])
+				bool ivu, uint32_t iv_idx,
+				const uint8_t dev_key[16],
+				uint16_t net_key_idx, const uint8_t net_key[16])
 {
 	if (!nodes)
 		nodes = l_queue_new();
@@ -2493,9 +2494,9 @@ const char *node_get_element_path(struct mesh_node *node, uint8_t ele_idx)
 	return ele->path;
 }
 
-bool node_add_pending_local(struct mesh_node *node, void *prov_node_info)
+bool node_add_pending_local(struct mesh_node *node,
+					const struct mesh_prov_node_info *info)
 {
-	struct mesh_prov_node_info *info = prov_node_info;
 	bool kr = !!(info->flags & PROV_FLAG_KR);
 	bool ivu = !!(info->flags & PROV_FLAG_IVU);
 
diff --git a/mesh/node.h b/mesh/node.h
index 4f31c50..cba51cb 100644
--- a/mesh/node.h
+++ b/mesh/node.h
@@ -14,6 +14,7 @@ struct mesh_io;
 struct mesh_agent;
 struct mesh_config;
 struct mesh_config_node;
+struct mesh_prov_node_info;
 
 typedef void (*node_ready_func_t) (void *user_data, int status,
 							struct mesh_node *node);
@@ -71,7 +72,8 @@ uint8_t node_friend_mode_get(struct mesh_node *node);
 const char *node_get_element_path(struct mesh_node *node, uint8_t ele_idx);
 const char *node_get_owner(struct mesh_node *node);
 const char *node_get_app_path(struct mesh_node *node);
-bool node_add_pending_local(struct mesh_node *node, void *info);
+bool node_add_pending_local(struct mesh_node *node,
+					const struct mesh_prov_node_info *info);
 void node_attach_io_all(struct mesh_io *io);
 void node_attach_io(struct mesh_node *node, struct mesh_io *io);
 void node_attach(const char *app_root, const char *sender, uint64_t token,
diff --git a/mesh/provision.h b/mesh/provision.h
index cfeb6de..3982c87 100644
--- a/mesh/provision.h
+++ b/mesh/provision.h
@@ -91,7 +91,7 @@ struct mesh_prov_node_info {
 
 typedef bool (*mesh_prov_acceptor_complete_func_t)(void *user_data,
 					uint8_t status,
-					struct mesh_prov_node_info *info);
+					const struct mesh_prov_node_info *info);
 
 typedef void (*mesh_prov_initiator_start_func_t)(void *user_data, int err);
 
@@ -100,7 +100,7 @@ typedef bool (*mesh_prov_initiator_data_req_func_t)(void *user_data,
 
 typedef bool (*mesh_prov_initiator_complete_func_t)(void *user_data,
 					uint8_t status,
-					struct mesh_prov_node_info *info);
+					const struct mesh_prov_node_info *info);
 
 typedef void (*mesh_prov_initiator_scan_result_t)(void *user_data,
 					uint16_t server, bool extended,
diff --git a/mesh/remprv-server.c b/mesh/remprv-server.c
index 53c764f..20a3da3 100644
--- a/mesh/remprv-server.c
+++ b/mesh/remprv-server.c
@@ -514,7 +514,7 @@ bool register_nppi_acceptor(mesh_prov_open_func_t open_cb,
 }
 
 static bool nppi_cmplt(void *user_data, uint8_t status,
-					struct mesh_prov_node_info *info)
+					const struct mesh_prov_node_info *info)
 {
 	struct rem_prov_data *prov = user_data;