summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/DHT.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/DHT.c b/core/DHT.c
index d359076d..5eae147c 100644
--- a/core/DHT.c
+++ b/core/DHT.c
@@ -633,6 +633,8 @@ static int handle_sendnodes(IP_Port source, uint8_t * packet, uint32_t length)
633 633
634int DHT_addfriend(uint8_t * client_id) 634int DHT_addfriend(uint8_t * client_id)
635{ 635{
636 if(friend_number(client_id) != -1) /*Is friend already in DHT?*/
637 return 1;
636 Friend * temp; 638 Friend * temp;
637 temp = realloc(friends_list, sizeof(Friend) * (num_friends + 1)); 639 temp = realloc(friends_list, sizeof(Friend) * (num_friends + 1));
638 if (temp == NULL) 640 if (temp == NULL)