summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/net_crypto.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index 18dd3b05..ac2359ee 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -37,21 +37,6 @@ static uint8_t crypt_connection_id_not_valid(const Net_Crypto *c, int crypt_conn
37 return (uint32_t)crypt_connection_id >= c->crypto_connections_length; 37 return (uint32_t)crypt_connection_id >= c->crypto_connections_length;
38} 38}
39 39
40/* return 0 if connection is dead.
41 * return 1 if connection is alive.
42 */
43static int is_alive(uint8_t status)
44{
45 if (status == CRYPTO_CONN_COOKIE_REQUESTING ||
46 status == CRYPTO_CONN_HANDSHAKE_SENT ||
47 status == CRYPTO_CONN_NOT_CONFIRMED ||
48 status == CRYPTO_CONN_ESTABLISHED) {
49 return 1;
50 }
51
52 return 0;
53}
54
55/* cookie timeout in seconds */ 40/* cookie timeout in seconds */
56#define COOKIE_TIMEOUT 10 41#define COOKIE_TIMEOUT 10
57#define COOKIE_DATA_LENGTH (crypto_box_PUBLICKEYBYTES * 2) 42#define COOKIE_DATA_LENGTH (crypto_box_PUBLICKEYBYTES * 2)