diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-08-01 23:02:13 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-08-16 21:01:43 +0000 |
commit | d6d305feeb76735ee4b4e14c6bca737a5482bc19 (patch) | |
tree | 99005c635a452245006b3b5de44f1dd80da9f77f /toxcore/onion.h | |
parent | 54066f338f185f2fbd6694d9a4877f42cbfa21c8 (diff) |
Use per-instance `Mono_Time` for Messenger and onion.
Diffstat (limited to 'toxcore/onion.h')
-rw-r--r-- | toxcore/onion.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/toxcore/onion.h b/toxcore/onion.h index 0e025a1c..ea177c70 100644 --- a/toxcore/onion.h +++ b/toxcore/onion.h | |||
@@ -25,11 +25,13 @@ | |||
25 | #define ONION_H | 25 | #define ONION_H |
26 | 26 | ||
27 | #include "DHT.h" | 27 | #include "DHT.h" |
28 | #include "mono_time.h" | ||
28 | 29 | ||
29 | typedef int onion_recv_1_cb(void *object, IP_Port dest, const uint8_t *data, uint16_t length); | 30 | typedef int onion_recv_1_cb(void *object, IP_Port dest, const uint8_t *data, uint16_t length); |
30 | 31 | ||
31 | typedef struct Onion { | 32 | typedef struct Onion { |
32 | DHT *dht; | 33 | Mono_Time *mono_time; |
34 | DHT *dht; | ||
33 | Networking_Core *net; | 35 | Networking_Core *net; |
34 | uint8_t secret_symmetric_key[CRYPTO_SYMMETRIC_KEY_SIZE]; | 36 | uint8_t secret_symmetric_key[CRYPTO_SYMMETRIC_KEY_SIZE]; |
35 | uint64_t timestamp; | 37 | uint64_t timestamp; |
@@ -158,7 +160,7 @@ int onion_send_1(const Onion *onion, const uint8_t *plain, uint16_t len, IP_Port | |||
158 | */ | 160 | */ |
159 | void set_callback_handle_recv_1(Onion *onion, onion_recv_1_cb *function, void *object); | 161 | void set_callback_handle_recv_1(Onion *onion, onion_recv_1_cb *function, void *object); |
160 | 162 | ||
161 | Onion *new_onion(DHT *dht); | 163 | Onion *new_onion(Mono_Time *mono_time, DHT *dht); |
162 | 164 | ||
163 | void kill_onion(Onion *onion); | 165 | void kill_onion(Onion *onion); |
164 | 166 | ||