diff options
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r-- | toxcore/net_crypto.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index 14cee200..d58f4c27 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #include "net_crypto.h" | 31 | #include "net_crypto.h" |
32 | 32 | #include "util.h" | |
33 | static uint8_t crypt_connection_id_not_valid(Net_Crypto *c, int crypt_connection_id) | 33 | static uint8_t crypt_connection_id_not_valid(Net_Crypto *c, int crypt_connection_id) |
34 | { | 34 | { |
35 | return (uint32_t)crypt_connection_id >= c->crypto_connections_length; | 35 | return (uint32_t)crypt_connection_id >= c->crypto_connections_length; |
@@ -799,6 +799,8 @@ static void receive_crypto(Net_Crypto *c) | |||
799 | */ | 799 | */ |
800 | Net_Crypto *new_net_crypto(Networking_Core *net) | 800 | Net_Crypto *new_net_crypto(Networking_Core *net) |
801 | { | 801 | { |
802 | unix_time_update(); | ||
803 | |||
802 | if (net == NULL) | 804 | if (net == NULL) |
803 | return NULL; | 805 | return NULL; |
804 | 806 | ||
@@ -837,6 +839,7 @@ static void kill_timedout(Net_Crypto *c) | |||
837 | /* Main loop. */ | 839 | /* Main loop. */ |
838 | void do_net_crypto(Net_Crypto *c) | 840 | void do_net_crypto(Net_Crypto *c) |
839 | { | 841 | { |
842 | unix_time_update(); | ||
840 | do_lossless_udp(c->lossless_udp); | 843 | do_lossless_udp(c->lossless_udp); |
841 | kill_timedout(c); | 844 | kill_timedout(c); |
842 | receive_crypto(c); | 845 | receive_crypto(c); |