summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-01-31 20:25:46 -0500
committerirungentoo <irungentoo@gmail.com>2014-01-31 20:25:46 -0500
commitd5c005f02462b996c067d7ed4f1ef71bbd4e5dd2 (patch)
treee4e1e3ec07ed38a55bc1d63c7b6dcad16a0ac0a4 /toxcore
parenta377c7fbf4344ba5359bc1fafafde415f50b4749 (diff)
Fixed error in last commit.
The tests actually work.
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/onion_client.c16
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. */