summaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorGDR! <gdr@gdr.name>2018-03-24 09:33:00 +0100
committerGDR! <gdr@gdr.name>2018-03-24 09:33:00 +0100
commit826ef1b9deea8d3f5f34ef523205571f8d9f5975 (patch)
tree7154870d05805b5ef3c9e317f63d8e3ddccdb87a /client.c
parent62d56bb6f4fc69bf5f4387fe8bdbe56c1590eefe (diff)
Move FAQ link up
Diffstat (limited to 'client.c')
-rw-r--r--client.c8
1 files changed, 8 insertions, 0 deletions
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: