[PATCH BlueZ 19/20] tools/mesh-cfgclient: Excluded addresses property

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

 



The correct name for a property that contains a list of addresses
not allowed in circulation is "networkExclusions"
The "excluded" property in "nodes" array entry is used to indicated that
this node has been removed from a mesh network and it's address should not
be re-used.
---
 tools/mesh/mesh-db.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tools/mesh/mesh-db.c b/tools/mesh/mesh-db.c
index b45212fc9..262a274c7 100644
--- a/tools/mesh/mesh-db.c
+++ b/tools/mesh/mesh-db.c
@@ -1724,7 +1724,7 @@ bool mesh_db_add_node(uint8_t uuid[16], uint8_t num_els, uint16_t unicast,
 	if (!add_string(jnode, "security", "secure"))
 		goto fail;
 
-	if (!write_bool(jnode, "blacklisted", false))
+	if (!write_bool(jnode, "excluded", false))
 		goto fail;
 
 	if (!write_bool(jnode, "configComplete", false))
@@ -2165,7 +2165,7 @@ static bool load_rejected_addresses(json_object *jobj)
 	json_object *jarray;
 	int i, cnt;
 
-	json_object_object_get_ex(jobj, "blacklistedAddresses", &jarray);
+	json_object_object_get_ex(jobj, "networkExclusions", &jarray);
 	if (!jarray || json_object_get_type(jarray) != json_type_array)
 		return true;
 
@@ -2212,11 +2212,10 @@ bool mesh_db_add_rejected_addr(uint16_t unicast, uint32_t iv_index)
 	if (!cfg || !cfg->jcfg)
 		return false;
 
-	json_object_object_get_ex(cfg->jcfg, "blacklistedAddresses", &jarray);
+	json_object_object_get_ex(cfg->jcfg, "networkExclusions", &jarray);
 	if (!jarray) {
 		jarray = json_object_new_array();
-		json_object_object_add(cfg->jcfg, "blacklistedAddresses",
-									jarray);
+		json_object_object_add(cfg->jcfg, "networkExclusions", jarray);
 	}
 
 	idx = get_rejected_by_iv_index(jarray, iv_index);
@@ -2261,7 +2260,7 @@ bool mesh_db_clear_rejected(uint32_t iv_index)
 	if (!cfg || !cfg->jcfg)
 		return false;
 
-	json_object_object_get_ex(cfg->jcfg, "blacklistedAddresses", &jarray);
+	json_object_object_get_ex(cfg->jcfg, "networkExclusions", &jarray);
 	if (!jarray || json_object_get_type(jarray) != json_type_array)
 		return false;
 
@@ -2338,7 +2337,7 @@ bool mesh_db_create(const char *fname, const uint8_t token[8],
 	if (!jarray)
 		goto fail;
 
-	json_object_object_add(jcfg, "blacklistedAddresses", jarray);
+	json_object_object_add(jcfg, "networkExclusions", jarray);
 
 	write_int(jcfg, "ivIndex", 0);
 
-- 
2.31.1




[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