From 6b38b704a4a36e183817323f61505130df6f1dea Mon Sep 17 00:00:00 2001 From: Aaron Lipinski Date: Sun, 11 Aug 2013 14:45:56 +1200 Subject: [PATCH] provide access to the close client list --- core/DHT.c | 6 ++++++ core/DHT.h | 2 ++ 2 files changed, 8 insertions(+) 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]; /*----------------------------------------------------------------------------------*/ + +Client_data * DHT_get_close_list(void) +{ + return close_clientlist; +} + /* Compares client_id1 and client_id2 with client_id * return 0 if both are same distance * 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 { uint64_t ret_timestamp; } Client_data; +Client_data * DHT_get_close_list(void); + /* Add a new friend to the friends list client_id must be CLIENT_ID_SIZE bytes long. returns 0 if success