diff options
author | irungentoo <irungentoo@gmail.com> | 2013-10-25 14:47:34 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-10-25 14:47:34 -0400 |
commit | 9ccdac0e8268776c2cd7f9f6af347d44ca03c73d (patch) | |
tree | 883f455a591b2c3ff588f7ceb8e3d3d5b9c5466f /toxcore | |
parent | b891446c31c5319182fcf98dd6e1edffef5857d6 (diff) |
All modules using unix_time should run unix_time_update()
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/group_chats.c | 3 | ||||
-rw-r--r-- | toxcore/net_crypto.c | 3 |
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 | ||
531 | Group_Chat *new_groupchat(Networking_Core *net) | 531 | Group_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 | ||
562 | void do_groupchat(Group_Chat *chat) | 564 | void 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 | */ |
754 | Net_Crypto *new_net_crypto(Networking_Core *net) | 754 | Net_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. */ |
792 | void do_net_crypto(Net_Crypto *c) | 794 | void 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); |