diff options
author | irungentoo <irungentoo@gmail.com> | 2013-06-24 14:31:50 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-06-24 14:31:50 -0400 |
commit | 61e9103076c6780668b3d47df5d7c479dd287167 (patch) | |
tree | 507737599784f2bb9bd1d05dcf312e5c487eb663 /core | |
parent | bdf3d9f6ab675adefa05ad84edc4241001a1052d (diff) |
Fixed some mistakes.
Diffstat (limited to 'core')
-rw-r--r-- | core/DHT.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -100,7 +100,7 @@ int replace_good(Client_data * list, uint32_t length, char * client_id, IP_Port | |||
100 | //Attempt to add client with ip_port and client_id to the friends client list and close_clientlist | 100 | //Attempt to add client with ip_port and client_id to the friends client list and close_clientlist |
101 | int addto_lists(IP_Port ip_port, char * client_id) | 101 | int addto_lists(IP_Port ip_port, char * client_id) |
102 | { | 102 | { |
103 | uint32_t i, j; | 103 | uint32_t i; |
104 | 104 | ||
105 | //NOTE: current behaviour if there are two clients with the same id is to only keep one (the first one) | 105 | //NOTE: current behaviour if there are two clients with the same id is to only keep one (the first one) |
106 | if(!client_in_list(close_clientlist, LCLIENT_LIST, client_id)) | 106 | if(!client_in_list(close_clientlist, LCLIENT_LIST, client_id)) |
@@ -143,7 +143,9 @@ int is_pinging(IP_Port ip_port) | |||
143 | 143 | ||
144 | for(i = 0; i < LPING_ARRAY; i++ ) | 144 | for(i = 0; i < LPING_ARRAY; i++ ) |
145 | { | 145 | { |
146 | if((pings[i].timestamp + PING_TIMEOUT) > unix_time() && pings[i].ip_port == ip_port) | 146 | if((pings[i].timestamp + PING_TIMEOUT) > unix_time() && |
147 | pings[i].ip_port.ip.i == ip_port.ip.i && | ||
148 | pings[i].ip_port.port == ip_port.port) | ||
147 | { | 149 | { |
148 | return 1; | 150 | return 1; |
149 | } | 151 | } |
@@ -161,7 +163,9 @@ int is_gettingnodes(IP_Port ip_port) | |||
161 | 163 | ||
162 | for(i = 0; i < LSEND_NODES_ARRAY; i++ ) | 164 | for(i = 0; i < LSEND_NODES_ARRAY; i++ ) |
163 | { | 165 | { |
164 | if((send_nodes[i].timestamp + PING_TIMEOUT) > unix_time() && send_nodes[i].ip_port == ip_port) | 166 | if((send_nodes[i].timestamp + PING_TIMEOUT) > unix_time() && |
167 | send_nodes[i].ip_port.ip.i == ip_port.ip.i && | ||
168 | send_nodes[i].ip_port.port == ip_port.port) | ||
165 | { | 169 | { |
166 | return 1; | 170 | return 1; |
167 | } | 171 | } |