summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-10-28 16:01:29 -0400
committerirungentoo <irungentoo@gmail.com>2013-10-28 16:01:29 -0400
commit415835ce3d2daa9ecd4100e76d58d93b3afa2db0 (patch)
tree755d041ea06a9b1c05fc72687c9dd5c6e98bbe73 /toxcore/net_crypto.c
parent988922bdeb94dd83e61ed387b29187ac4c9936e0 (diff)
parent2bdce934373d238778bc77a04198bd3f1481542f (diff)
Merge branch 'master' into harden
Also removed some old, useless loading code.
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r--toxcore/net_crypto.c5
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"
33static uint8_t crypt_connection_id_not_valid(Net_Crypto *c, int crypt_connection_id) 33static 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 */
800Net_Crypto *new_net_crypto(Networking_Core *net) 800Net_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. */
838void do_net_crypto(Net_Crypto *c) 840void 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);