diff options
author | irungentoo <irungentoo@gmail.com> | 2014-05-12 14:39:12 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-05-12 14:39:12 -0400 |
commit | 8783bea25ee366cfa3b1fa7c8930c2c2ffaef8fc (patch) | |
tree | 57229407341f4ddb88cb5c337e12e6305eb7099e /toxcore/onion_client.h | |
parent | 10da970e0dfcb21fda4da96635b690065375daff (diff) |
Use ping_array to store onion announce information instead of sending
over a huge cookie.
This reduces the size of the onion announce packets by 100 bytes.
Diffstat (limited to 'toxcore/onion_client.h')
-rw-r--r-- | toxcore/onion_client.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/toxcore/onion_client.h b/toxcore/onion_client.h index 32d2989f..06909380 100644 --- a/toxcore/onion_client.h +++ b/toxcore/onion_client.h | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include "onion_announce.h" | 27 | #include "onion_announce.h" |
28 | #include "net_crypto.h" | 28 | #include "net_crypto.h" |
29 | #include "ping_array.h" | ||
29 | 30 | ||
30 | #define MAX_ONION_CLIENTS 8 | 31 | #define MAX_ONION_CLIENTS 8 |
31 | #define ONION_NODE_PING_INTERVAL 30 | 32 | #define ONION_NODE_PING_INTERVAL 30 |
@@ -124,6 +125,8 @@ typedef struct { | |||
124 | uint32_t ping_nodes_sent_second; | 125 | uint32_t ping_nodes_sent_second; |
125 | 126 | ||
126 | Last_Pinged last_pinged[MAX_STORED_PINGED_NODES]; | 127 | Last_Pinged last_pinged[MAX_STORED_PINGED_NODES]; |
128 | |||
129 | Ping_Array announce_ping_array; | ||
127 | uint8_t last_pinged_index; | 130 | uint8_t last_pinged_index; |
128 | struct { | 131 | struct { |
129 | oniondata_handler_callback function; | 132 | oniondata_handler_callback function; |