summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.h
diff options
context:
space:
mode:
authorPavel Karelin <hkarel@yandex.ru>2018-05-15 09:57:07 +0300
committerPavel Karelin <hkarel@yandex.ru>2018-05-23 17:32:18 +0300
commit461c8f51f5c7165884cb556443ba8950532b46eb (patch)
tree21988da8b9fe4001d8991b9fa881f1929830ba84 /toxcore/net_crypto.h
parent2d0a21adb3069140da5009d2caa41cc837e23202 (diff)
Fix the often call of event tox_friend_connection_status
Fixes #868 Is made by: 1. Fix enumeration mechanism of Crypto_Connection instances in function send_crypto_packets() (this item solves the main problem); 2. Disruption of correlation between parameters of different dimensions (the parameters MAX_NUM_SENDPACKET_TRIES and UDP_DIRECT_TIMEOUT have different dimensions).
Diffstat (limited to 'toxcore/net_crypto.h')
-rw-r--r--toxcore/net_crypto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h
index bd00a3fe..ec55bf6f 100644
--- a/toxcore/net_crypto.h
+++ b/toxcore/net_crypto.h
@@ -62,7 +62,7 @@
62#define MAX_NUM_SENDPACKET_TRIES 8 62#define MAX_NUM_SENDPACKET_TRIES 8
63 63
64/* The timeout of no received UDP packets before the direct UDP connection is considered dead. */ 64/* The timeout of no received UDP packets before the direct UDP connection is considered dead. */
65#define UDP_DIRECT_TIMEOUT ((MAX_NUM_SENDPACKET_TRIES * CRYPTO_SEND_PACKET_INTERVAL) / 1000) 65#define UDP_DIRECT_TIMEOUT 8
66 66
67#define PACKET_ID_PADDING 0 /* Denotes padding */ 67#define PACKET_ID_PADDING 0 /* Denotes padding */
68#define PACKET_ID_REQUEST 1 /* Used to request unreceived packets */ 68#define PACKET_ID_REQUEST 1 /* Used to request unreceived packets */