From 9ccdac0e8268776c2cd7f9f6af347d44ca03c73d Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 25 Oct 2013 14:47:34 -0400 Subject: [PATCH] All modules using unix_time should run unix_time_update() --- toxcore/group_chats.c | 3 +++ toxcore/net_crypto.c | 3 +++ 2 files changed, 6 insertions(+) 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, Group_Chat *new_groupchat(Networking_Core *net) { + unix_time_update(); + if (net == 0) return 0; @@ -561,6 +563,7 @@ static void ping_close(Group_Chat *chat) void do_groupchat(Group_Chat *chat) { + unix_time_update(); ping_close(chat); } 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) */ Net_Crypto *new_net_crypto(Networking_Core *net) { + unix_time_update(); + if (net == NULL) return NULL; @@ -791,6 +793,7 @@ static void kill_timedout(Net_Crypto *c) /* Main loop. */ void do_net_crypto(Net_Crypto *c) { + unix_time_update(); do_lossless_udp(c->lossless_udp); kill_timedout(c); receive_crypto(c);