summaryrefslogtreecommitdiff
path: root/core/DHT.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-07-20 19:59:01 -0400
committerirungentoo <irungentoo@gmail.com>2013-07-20 19:59:01 -0400
commitb9b50481be282a5c7fdadac2c79c38a2d4d49d35 (patch)
tree583b56846b780d43470acde12087010a699b531e /core/DHT.c
parent9eb301e51d0554ab4bb396a4b338717f82b66261 (diff)
Fixed segfault.
Diffstat (limited to 'core/DHT.c')
-rw-r--r--core/DHT.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/DHT.c b/core/DHT.c
index 2726aec6..4aa73697 100644
--- a/core/DHT.c
+++ b/core/DHT.c
@@ -861,12 +861,12 @@ void doDHTFriends()
861{ 861{
862 uint32_t i, j; 862 uint32_t i, j;
863 uint32_t temp_time = unix_time(); 863 uint32_t temp_time = unix_time();
864 uint32_t num_nodes = 0;
865 uint32_t rand_node; 864 uint32_t rand_node;
866 uint32_t index[MAX_FRIEND_CLIENTS]; 865 uint32_t index[MAX_FRIEND_CLIENTS];
867 866
868 for(i = 0; i < num_friends; ++i) 867 for(i = 0; i < num_friends; ++i)
869 { 868 {
869 uint32_t num_nodes = 0;
870 for(j = 0; j < MAX_FRIEND_CLIENTS; ++j) 870 for(j = 0; j < MAX_FRIEND_CLIENTS; ++j)
871 { 871 {
872 if(friends_list[i].client_list[j].timestamp + Kill_NODE_TIMEOUT > temp_time) /* if node is not dead. */ 872 if(friends_list[i].client_list[j].timestamp + Kill_NODE_TIMEOUT > temp_time) /* if node is not dead. */