From 826ef1b9deea8d3f5f34ef523205571f8d9f5975 Mon Sep 17 00:00:00 2001 From: GDR! Date: Sat, 24 Mar 2018 09:33:00 +0100 Subject: [PATCH] Move FAQ link up --- README.md | 8 ++++---- client.c | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 33338c7..b1c263d 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,10 @@ The Tuntox Server can optionally allow only whitelisted ToxIDs. Supply *-i youra Tuntox is piggybacking on the Tox protocol, which itself has not been audited by security researchers. Tox crypto has been implemented with libsodium (which is based on Bernstein's NaCl) and thus uses the ecliptic curve 25519 for key exchange and salsa20 for stream encryption. According to the author's best knowledge, libsodium makes it as hard as possible to get crypto wrong, but we don't know until Tox has been audited. +## FAQ + +[yes, there is one](FAQ.md) + ## License Sorry about GPLv3 - both toxcore and utox (from which I borrowed some code) are GPLv3. @@ -81,7 +85,3 @@ Sorry about GPLv3 - both toxcore and utox (from which I borrowed some code) are Thank you to the toxcore and utox developers without whom this program would never exist. Thank you Mr_4551 for your help and motivation. - -## FAQ - -[yes, there is one](FAQ.md) diff --git a/client.c b/client.c index aaa3f67..4bf109b 100644 --- a/client.c +++ b/client.c @@ -260,6 +260,8 @@ int do_client_loop(uint8_t *tox_id_str) unsigned char tox_packet_buf[PROTOCOL_MAX_PACKET_SIZE]; unsigned char tox_id[TOX_ADDRESS_SIZE]; uint32_t friendnumber = 0; + TOX_CONNECTION last_friend_connection_status = TOX_CONNECTION_NONE; + time_t last_friend_connection_status_received = 0; struct timeval tv; fd_set fds; static time_t invitation_sent_time = 0; @@ -357,6 +359,8 @@ int do_client_loop(uint8_t *tox_id_str) } else { + last_friend_connection_status_received = time(NULL); + if(friend_connection_status != TOX_CONNECTION_NONE) { const char* status = readable_connection_status(friend_connection_status); @@ -570,6 +574,10 @@ int do_client_loop(uint8_t *tox_id_str) } fds = client_master_fdset; + + if(time(NULL) - last_friend_connection_status_received > 60) + { + } } break; case CLIENT_STATE_SHUTDOWN: