summaryrefslogtreecommitdiff
path: root/toxcore
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
parentb891446c31c5319182fcf98dd6e1edffef5857d6 (diff)
All modules using unix_time should run unix_time_update()
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/group_chats.c3
-rw-r--r--toxcore/net_crypto.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/toxcore/group_chats.c b/toxcore/group_chats.c
index 8609e45b..fdf6e834 100644
--- a/toxcore/group_chats.c
+++ b/toxcore/group_chats.c
@@ -530,6 +530,8 @@ void callback_groupmessage(Group_Chat *chat, void (*function)(Group_Chat *chat,
530 530
531Group_Chat *new_groupchat(Networking_Core *net) 531Group_Chat *new_groupchat(Networking_Core *net)
532{ 532{
533 unix_time_update();
534
533 if (net == 0) 535 if (net == 0)
534 return 0; 536 return 0;
535 537
@@ -561,6 +563,7 @@ static void ping_close(Group_Chat *chat)
561 563
562void do_groupchat(Group_Chat *chat) 564void do_groupchat(Group_Chat *chat)
563{ 565{
566 unix_time_update();
564 ping_close(chat); 567 ping_close(chat);
565} 568}
566 569
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);