diff options
Diffstat (limited to 'toxcore/ping.c')
-rw-r--r-- | toxcore/ping.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/toxcore/ping.c b/toxcore/ping.c index e3db6ed1..6c368d0c 100644 --- a/toxcore/ping.c +++ b/toxcore/ping.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <stdint.h> | 30 | #include <stdint.h> |
31 | 31 | ||
32 | #include "DHT.h" | 32 | #include "DHT.h" |
33 | #include "assoc.h" | ||
34 | #include "ping.h" | 33 | #include "ping.h" |
35 | 34 | ||
36 | #include "network.h" | 35 | #include "network.h" |
@@ -260,16 +259,7 @@ static int handle_ping_response(void *_dht, IP_Port source, uint8_t *packet, uin | |||
260 | if (!ping_index) | 259 | if (!ping_index) |
261 | return 1; | 260 | return 1; |
262 | 261 | ||
263 | /* Associate client_id with the ip the request was sent to */ | 262 | addto_lists(dht, source, packet + 1); |
264 | int used = addto_lists(dht, ping->pings[ping_index - 1].ip_port, packet + 1); | ||
265 | |||
266 | if (dht->assoc) { | ||
267 | IPPTs ippts; | ||
268 | ippts.ip_port = ping->pings[ping_index - 1].ip_port; | ||
269 | ippts.timestamp = ping->pings[ping_index - 1].timestamp; | ||
270 | |||
271 | Assoc_add_entry(dht->assoc, packet + 1, &ippts, &source, used > 0 ? 1 : 0); | ||
272 | } | ||
273 | 263 | ||
274 | return 0; | 264 | return 0; |
275 | } | 265 | } |