Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill unused code.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 28 Dec 2019 10:51:07 +0000 (11:51 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 28 Dec 2019 10:51:38 +0000 (11:51 +0100)
examples/deprecated/msg/dht-kademlia/routing_table.c
examples/deprecated/msg/dht-kademlia/routing_table.h

index 68d2661..afb1455 100644 (file)
@@ -35,13 +35,6 @@ void routing_table_free(routing_table_t table)
   xbt_free(table);
 }
 
-/** Returns if the routing table contains the id. */
-unsigned int routing_table_contains(routing_table_t table, unsigned int node_id)
-{
-  bucket_t bucket = routing_table_find_bucket(table, node_id);
-  return bucket_contains(bucket, node_id);
-}
-
 /**@brief prints the routing table, to debug stuff. */
 void routing_table_print(const_routing_table_t table)
 {
@@ -75,12 +68,6 @@ unsigned int bucket_find_id(const_bucket_t bucket, unsigned int id)
   return -1;
 }
 
-/** Returns if the bucket contains an identifier.  */
-unsigned int bucket_contains(const_bucket_t bucket, unsigned int id)
-{
-  return xbt_dynar_member(bucket->nodes, &id);
-}
-
 /** @brief Finds the corresponding bucket in a routing table for a given identifier
   * @param table the routing table
   * @param id the identifier
index a192f24..b4f93a7 100644 (file)
@@ -29,12 +29,10 @@ typedef const s_routing_table_t* const_routing_table_t;
 
 // bucket functions
 unsigned int bucket_find_id(const_bucket_t bucket, unsigned int id);
-unsigned int bucket_contains(const_bucket_t bucket, unsigned int id);
 
 // routing table functions
 routing_table_t routing_table_init(unsigned int node_id);
 void routing_table_free(routing_table_t table);
-unsigned int routing_table_contains(routing_table_t table, unsigned int node_id);
 void routing_table_print(const_routing_table_t table);
 bucket_t routing_table_find_bucket(const_routing_table_t table, unsigned int id);