diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 7cba27a9e..93697c282 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) for (i = 0; i < num_nodes; ++i) client_send_announce_request(onion_c, friendnum + 1, nodes_list[i].ip_port, nodes_list[i].client_id, 0); } - - - /* send packets to friend telling them our fake DHT id. */ - if (is_timeout(onion_c->friends_list[friendnum].last_fakeid_onion_sent, ONION_FAKEID_INTERVAL)) - if (send_fakeid_announce(onion_c, friendnum, 0) >= 1) - onion_c->friends_list[friendnum].last_fakeid_onion_sent = unix_time(); - - if (is_timeout(onion_c->friends_list[friendnum].last_fakeid_dht_sent, DHT_FAKEID_INTERVAL)) - if (send_fakeid_announce(onion_c, friendnum, 1) >= 1) - onion_c->friends_list[friendnum].last_fakeid_dht_sent = unix_time(); } + + /* send packets to friend telling them our fake DHT id. */ + if (is_timeout(onion_c->friends_list[friendnum].last_fakeid_onion_sent, ONION_FAKEID_INTERVAL)) + if (send_fakeid_announce(onion_c, friendnum, 0) >= 1) + onion_c->friends_list[friendnum].last_fakeid_onion_sent = unix_time(); + + if (is_timeout(onion_c->friends_list[friendnum].last_fakeid_dht_sent, DHT_FAKEID_INTERVAL)) + if (send_fakeid_announce(onion_c, friendnum, 1) >= 1) + onion_c->friends_list[friendnum].last_fakeid_dht_sent = unix_time(); + } } /* Function to call when onion data packet with contents beginning with byte is received. */