mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
If we receive a packet from a node we are searching for, ping it.
This commit is contained in:
parent
9c64769331
commit
73b2bce08a
1
DONATORS
1
DONATORS
|
@ -4,3 +4,4 @@ Spitfire is best technicolor horse.
|
||||||
if bad people don't hate you, you're doing something wrong
|
if bad people don't hate you, you're doing something wrong
|
||||||
Pinkie Pie is best pony.
|
Pinkie Pie is best pony.
|
||||||
JRS was here
|
JRS was here
|
||||||
|
qTox is so bloated it doesn't even fit in a 64-bit address space
|
||||||
|
|
|
@ -267,6 +267,13 @@ int add_to_ping(PING *ping, const uint8_t *public_key, IP_Port ip_port)
|
||||||
|
|
||||||
uint32_t i;
|
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) {
|
for (i = 0; i < MAX_TO_PING; ++i) {
|
||||||
if (!ip_isset(&ping->to_ping[i].ip_port.ip)) {
|
if (!ip_isset(&ping->to_ping[i].ip_port.ip)) {
|
||||||
memcpy(ping->to_ping[i].public_key, public_key, crypto_box_PUBLICKEYBYTES);
|
memcpy(ping->to_ping[i].public_key, public_key, crypto_box_PUBLICKEYBYTES);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user