From 2d88476d44216b7032bdddf19cf8eba38b7f6705 Mon Sep 17 00:00:00 2001
From: irungentoo <irungentoo@gmail.com>
Date: Fri, 19 Jul 2013 12:09:40 -0400
Subject: [PATCH] Fixed big bug in DHT.

---
 core/DHT.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/DHT.c b/core/DHT.c
index afa32023..232bf1e1 100644
--- a/core/DHT.c
+++ b/core/DHT.c
@@ -206,7 +206,7 @@ int get_close_nodes(uint8_t * client_id, Node_format * nodes_list)
                 }
                 else for(k = 0; k < MAX_SENT_NODES; k++)
                 {
-                    if(id_closest(client_id, nodes_list[k].client_id, friends_list[i].client_list[j].client_id) == 2)
+                    if(id_closest(friends_list[i].client_id, nodes_list[k].client_id, friends_list[i].client_list[j].client_id) == 2)
                     {
                         memcpy(nodes_list[k].client_id, friends_list[i].client_list[j].client_id, CLIENT_ID_SIZE);
                         nodes_list[k].ip_port = friends_list[i].client_list[j].ip_port;