diff options
-rw-r--r-- | toxcore/onion_client.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 7cba27a9..93697c28 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c | |||
@@ -775,17 +775,17 @@ static void do_friend(Onion_Client *onion_c, uint16_t friendnum) | |||
775 | for (i = 0; i < num_nodes; ++i) | 775 | for (i = 0; i < num_nodes; ++i) |
776 | client_send_announce_request(onion_c, friendnum + 1, nodes_list[i].ip_port, nodes_list[i].client_id, 0); | 776 | client_send_announce_request(onion_c, friendnum + 1, nodes_list[i].ip_port, nodes_list[i].client_id, 0); |
777 | } | 777 | } |
778 | } | ||
778 | 779 | ||
780 | /* send packets to friend telling them our fake DHT id. */ | ||
781 | if (is_timeout(onion_c->friends_list[friendnum].last_fakeid_onion_sent, ONION_FAKEID_INTERVAL)) | ||
782 | if (send_fakeid_announce(onion_c, friendnum, 0) >= 1) | ||
783 | onion_c->friends_list[friendnum].last_fakeid_onion_sent = unix_time(); | ||
779 | 784 | ||
780 | /* send packets to friend telling them our fake DHT id. */ | 785 | if (is_timeout(onion_c->friends_list[friendnum].last_fakeid_dht_sent, DHT_FAKEID_INTERVAL)) |
781 | if (is_timeout(onion_c->friends_list[friendnum].last_fakeid_onion_sent, ONION_FAKEID_INTERVAL)) | 786 | if (send_fakeid_announce(onion_c, friendnum, 1) >= 1) |
782 | if (send_fakeid_announce(onion_c, friendnum, 0) >= 1) | 787 | onion_c->friends_list[friendnum].last_fakeid_dht_sent = unix_time(); |
783 | onion_c->friends_list[friendnum].last_fakeid_onion_sent = unix_time(); | ||
784 | 788 | ||
785 | if (is_timeout(onion_c->friends_list[friendnum].last_fakeid_dht_sent, DHT_FAKEID_INTERVAL)) | ||
786 | if (send_fakeid_announce(onion_c, friendnum, 1) >= 1) | ||
787 | onion_c->friends_list[friendnum].last_fakeid_dht_sent = unix_time(); | ||
788 | } | ||
789 | } | 789 | } |
790 | } | 790 | } |
791 | /* Function to call when onion data packet with contents beginning with byte is received. */ | 791 | /* Function to call when onion data packet with contents beginning with byte is received. */ |