summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Lipinski <kris.lipinski@gmail.com>2013-08-11 14:45:56 +1200
committerAaron Lipinski <kris.lipinski@gmail.com>2013-08-15 12:02:56 +1200
commit6b38b704a4a36e183817323f61505130df6f1dea (patch)
treecab3cffdef1ccadff70b7484534a8aebe0b7b0c5
parent93b34ef9e3b4ad44b9f387b112d168b2db55b8a3 (diff)
provide access to the close client list
-rw-r--r--core/DHT.c6
-rw-r--r--core/DHT.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/core/DHT.c b/core/DHT.c
index cf0b396c..1d13aa73 100644
--- a/core/DHT.c
+++ b/core/DHT.c
@@ -104,6 +104,12 @@ static Pinged send_nodes[LSEND_NODES_ARRAY];
104 104
105/*----------------------------------------------------------------------------------*/ 105/*----------------------------------------------------------------------------------*/
106 106
107
108Client_data * DHT_get_close_list(void)
109{
110 return close_clientlist;
111}
112
107/* Compares client_id1 and client_id2 with client_id 113/* Compares client_id1 and client_id2 with client_id
108 * return 0 if both are same distance 114 * return 0 if both are same distance
109 * return 1 if client_id1 is closer 115 * return 1 if client_id1 is closer
diff --git a/core/DHT.h b/core/DHT.h
index bfbe8829..00a43d76 100644
--- a/core/DHT.h
+++ b/core/DHT.h
@@ -45,6 +45,8 @@ typedef struct {
45 uint64_t ret_timestamp; 45 uint64_t ret_timestamp;
46} Client_data; 46} Client_data;
47 47
48Client_data * DHT_get_close_list(void);
49
48/* Add a new friend to the friends list 50/* Add a new friend to the friends list
49 client_id must be CLIENT_ID_SIZE bytes long. 51 client_id must be CLIENT_ID_SIZE bytes long.
50 returns 0 if success 52 returns 0 if success