summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-10-25 14:47:34 -0400
committerirungentoo <irungentoo@gmail.com>2013-10-25 14:47:34 -0400
commit9ccdac0e8268776c2cd7f9f6af347d44ca03c73d (patch)
tree883f455a591b2c3ff588f7ceb8e3d3d5b9c5466f /toxcore/net_crypto.c
parentb891446c31c5319182fcf98dd6e1edffef5857d6 (diff)
All modules using unix_time should run unix_time_update()
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r--toxcore/net_crypto.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index a9aa77f9..9b8eff96 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -753,6 +753,8 @@ static void receive_crypto(Net_Crypto *c)
753 */ 753 */
754Net_Crypto *new_net_crypto(Networking_Core *net) 754Net_Crypto *new_net_crypto(Networking_Core *net)
755{ 755{
756 unix_time_update();
757
756 if (net == NULL) 758 if (net == NULL)
757 return NULL; 759 return NULL;
758 760
@@ -791,6 +793,7 @@ static void kill_timedout(Net_Crypto *c)
791/* Main loop. */ 793/* Main loop. */
792void do_net_crypto(Net_Crypto *c) 794void do_net_crypto(Net_Crypto *c)
793{ 795{
796 unix_time_update();
794 do_lossless_udp(c->lossless_udp); 797 do_lossless_udp(c->lossless_udp);
795 kill_timedout(c); 798 kill_timedout(c);
796 receive_crypto(c); 799 receive_crypto(c);