diff options
author | GDR! <gdr@gdr.name> | 2018-03-24 10:19:12 +0100 |
---|---|---|
committer | GDR! <gdr@gdr.name> | 2018-03-24 10:19:12 +0100 |
commit | 74a5c4adbfd0a0a4a1dda3aedc875bc04bcf3c34 (patch) | |
tree | 284dc9f97f7e01839c6cd2a54024c85b75de96bb | |
parent | 3b26f4eac390008113ca0d5c0978ed7da19dfa34 (diff) |
Friend connection status printed correctly
-rw-r--r-- | FAQ.md | 6 | ||||
-rw-r--r-- | client.c | 4 | ||||
-rw-r--r-- | gitversion.h | 2 | ||||
-rw-r--r-- | util.c | 1 |
4 files changed, 10 insertions, 3 deletions
@@ -41,6 +41,12 @@ The connection is likely to have worse latency when you see the following: | |||
41 | 2018-03-24 08:57:21: [INFO] Friend request accepted (A TCP connection has been established (via TCP relay))! | 41 | 2018-03-24 08:57:21: [INFO] Friend request accepted (A TCP connection has been established (via TCP relay))! |
42 | ``` | 42 | ``` |
43 | 43 | ||
44 | There's, however, a chance that it will upgrade to UDP after a few minutes: | ||
45 | |||
46 | ``` | ||
47 | 2018-03-24 10:17:06: [INFO] Friend connection status changed to: An UDP connection has been established | ||
48 | ``` | ||
49 | |||
44 | ## I have a direct UDP connection. Why isn't my connection faster? | 50 | ## I have a direct UDP connection. Why isn't my connection faster? |
45 | 51 | ||
46 | Wait until https://github.com/gjedeer/tuntox/issues/41 is implemented. This change should improve speed and latency in the 10 Mbit/s+ range. | 52 | Wait until https://github.com/gjedeer/tuntox/issues/41 is implemented. This change should improve speed and latency in the 10 Mbit/s+ range. |
@@ -33,7 +33,7 @@ int handle_pong_frame() | |||
33 | secs1 = (1.0 * ping_sent_time.tv_sec) + (1e-9 * ping_sent_time.tv_nsec); | 33 | secs1 = (1.0 * ping_sent_time.tv_sec) + (1e-9 * ping_sent_time.tv_nsec); |
34 | secs2 = (1.0 * pong_rcvd_time.tv_sec) + (1e-9 * pong_rcvd_time.tv_nsec); | 34 | secs2 = (1.0 * pong_rcvd_time.tv_sec) + (1e-9 * pong_rcvd_time.tv_nsec); |
35 | 35 | ||
36 | printf("GOT PONG! Time = %.3fs\n", secs2-secs1); | 36 | log_printf(L_INFO, "GOT PONG! Time = %.3fs\n", secs2-secs1); |
37 | 37 | ||
38 | if(ping_mode) | 38 | if(ping_mode) |
39 | { | 39 | { |
@@ -582,7 +582,7 @@ int do_client_loop(uint8_t *tox_id_str) | |||
582 | friend_connection_status = tox_friend_get_connection_status(tox, friendnumber, &friend_query_error); | 582 | friend_connection_status = tox_friend_get_connection_status(tox, friendnumber, &friend_query_error); |
583 | if(friend_query_error != TOX_ERR_FRIEND_QUERY_OK) | 583 | if(friend_query_error != TOX_ERR_FRIEND_QUERY_OK) |
584 | { | 584 | { |
585 | log_printf(L_DEBUG, "tox_friend_get_connection_status: error %u", friend_query_error); | 585 | log_printf(L_DEBUG, "tox_friend_get_connection_status: error %u\n", friend_query_error); |
586 | } | 586 | } |
587 | else | 587 | else |
588 | { | 588 | { |
diff --git a/gitversion.h b/gitversion.h index d4b7062..f446268 100644 --- a/gitversion.h +++ b/gitversion.h | |||
@@ -1 +1 @@ | |||
#define GITVERSION "a6e3e443c5b788c7d1b43a1f9118d772a5a18f8d" | #define GITVERSION "3b26f4eac390008113ca0d5c0978ed7da19dfa34" | ||
@@ -198,6 +198,7 @@ const char *readable_connection_status(TOX_CONNECTION status) | |||
198 | case TOX_CONNECTION_UDP: | 198 | case TOX_CONNECTION_UDP: |
199 | return "An UDP connection has been established"; | 199 | return "An UDP connection has been established"; |
200 | default: | 200 | default: |
201 | log_printf(L_WARNING, "Received unknown connection status %d\n", (int)status); | ||
201 | return "Unknown connection status"; | 202 | return "Unknown connection status"; |
202 | } | 203 | } |
203 | } | 204 | } |