diff --git a/DONATORS b/DONATORS index fc7ee4195..dcce32c86 100644 --- a/DONATORS +++ b/DONATORS @@ -4,3 +4,4 @@ Spitfire is best technicolor horse. if bad people don't hate you, you're doing something wrong Pinkie Pie is best pony. JRS was here +qTox is so bloated it doesn't even fit in a 64-bit address space diff --git a/toxcore/ping.c b/toxcore/ping.c index 877aaca2d..c2ca2f91f 100644 --- a/toxcore/ping.c +++ b/toxcore/ping.c @@ -267,6 +267,13 @@ int add_to_ping(PING *ping, const uint8_t *public_key, IP_Port ip_port) uint32_t i; + IP_Port temp; + + if (DHT_getfriendip(ping->dht, public_key, &temp) == 0) { + send_ping_request(ping, ping->to_ping[i].ip_port, ping->to_ping[i].public_key); + return -1; + } + for (i = 0; i < MAX_TO_PING; ++i) { if (!ip_isset(&ping->to_ping[i].ip_port.ip)) { memcpy(ping->to_ping[i].public_key, public_key, crypto_box_PUBLICKEYBYTES);