diff options
author | irungentoo <irungentoo@gmail.com> | 2014-08-07 16:58:17 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-08-07 16:58:17 -0400 |
commit | 545cc916620c8c9bff5145a216b55a26fcd62d46 (patch) | |
tree | 78d6c06a35395ad48052926164c094d931b1785b | |
parent | a679756ecad52b1cfb6245f8458bfc0459b9a3d5 (diff) |
Increased ping interval time to decrease bandwidth usage.
This should not increase the time it takes for people to find themselves.
-rw-r--r-- | toxcore/onion_client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 42982ea8..96831beb 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c | |||
@@ -966,7 +966,8 @@ int onion_set_friend_online(Onion_Client *onion_c, int friend_num, uint8_t is_on | |||
966 | } | 966 | } |
967 | 967 | ||
968 | 968 | ||
969 | #define ANNOUNCE_FRIEND ONION_NODE_PING_INTERVAL | 969 | #define ANNOUNCE_FRIEND (ONION_NODE_PING_INTERVAL * 3) |
970 | #define FRIEND_ONION_NODE_TIMEOUT (ONION_NODE_TIMEOUT * 3) | ||
970 | 971 | ||
971 | static void do_friend(Onion_Client *onion_c, uint16_t friendnum) | 972 | static void do_friend(Onion_Client *onion_c, uint16_t friendnum) |
972 | { | 973 | { |
@@ -981,7 +982,7 @@ static void do_friend(Onion_Client *onion_c, uint16_t friendnum) | |||
981 | 982 | ||
982 | if (!onion_c->friends_list[friendnum].is_online) { | 983 | if (!onion_c->friends_list[friendnum].is_online) { |
983 | for (i = 0; i < MAX_ONION_CLIENTS; ++i) { | 984 | for (i = 0; i < MAX_ONION_CLIENTS; ++i) { |
984 | if (is_timeout(list_nodes[i].timestamp, ONION_NODE_TIMEOUT)) | 985 | if (is_timeout(list_nodes[i].timestamp, FRIEND_ONION_NODE_TIMEOUT)) |
985 | continue; | 986 | continue; |
986 | 987 | ||
987 | ++count; | 988 | ++count; |