summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md8
-rw-r--r--client.c8
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
74 74
75Tuntox 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. 75Tuntox 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.
76 76
77## FAQ
78
79[yes, there is one](FAQ.md)
80
77## License 81## License
78 82
79Sorry about GPLv3 - both toxcore and utox (from which I borrowed some code) are GPLv3. 83Sorry 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
81Thank you to the toxcore and utox developers without whom this program would never exist. 85Thank you to the toxcore and utox developers without whom this program would never exist.
82 86
83Thank you Mr_4551 for your help and motivation. 87Thank you Mr_4551 for your help and motivation.
84
85## FAQ
86
87[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)
260 unsigned char tox_packet_buf[PROTOCOL_MAX_PACKET_SIZE]; 260 unsigned char tox_packet_buf[PROTOCOL_MAX_PACKET_SIZE];
261 unsigned char tox_id[TOX_ADDRESS_SIZE]; 261 unsigned char tox_id[TOX_ADDRESS_SIZE];
262 uint32_t friendnumber = 0; 262 uint32_t friendnumber = 0;
263 TOX_CONNECTION last_friend_connection_status = TOX_CONNECTION_NONE;
264 time_t last_friend_connection_status_received = 0;
263 struct timeval tv; 265 struct timeval tv;
264 fd_set fds; 266 fd_set fds;
265 static time_t invitation_sent_time = 0; 267 static time_t invitation_sent_time = 0;
@@ -357,6 +359,8 @@ int do_client_loop(uint8_t *tox_id_str)
357 } 359 }
358 else 360 else
359 { 361 {
362 last_friend_connection_status_received = time(NULL);
363
360 if(friend_connection_status != TOX_CONNECTION_NONE) 364 if(friend_connection_status != TOX_CONNECTION_NONE)
361 { 365 {
362 const char* status = readable_connection_status(friend_connection_status); 366 const char* status = readable_connection_status(friend_connection_status);
@@ -570,6 +574,10 @@ int do_client_loop(uint8_t *tox_id_str)
570 } 574 }
571 575
572 fds = client_master_fdset; 576 fds = client_master_fdset;
577
578 if(time(NULL) - last_friend_connection_status_received > 60)
579 {
580 }
573 } 581 }
574 break; 582 break;
575 case CLIENT_STATE_SHUTDOWN: 583 case CLIENT_STATE_SHUTDOWN: