diff options
Diffstat (limited to 'toxcore/onion_client.h')
-rw-r--r-- | toxcore/onion_client.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/toxcore/onion_client.h b/toxcore/onion_client.h index 91056a09..47d08eca 100644 --- a/toxcore/onion_client.h +++ b/toxcore/onion_client.h | |||
@@ -24,8 +24,8 @@ | |||
24 | #ifndef ONION_CLIENT_H | 24 | #ifndef ONION_CLIENT_H |
25 | #define ONION_CLIENT_H | 25 | #define ONION_CLIENT_H |
26 | 26 | ||
27 | #include "onion_announce.h" | ||
28 | #include "net_crypto.h" | 27 | #include "net_crypto.h" |
28 | #include "onion_announce.h" | ||
29 | #include "ping_array.h" | 29 | #include "ping_array.h" |
30 | 30 | ||
31 | #define MAX_ONION_CLIENTS 8 | 31 | #define MAX_ONION_CLIENTS 8 |
@@ -114,7 +114,7 @@ typedef struct { | |||
114 | void *tcp_relay_node_callback_object; | 114 | void *tcp_relay_node_callback_object; |
115 | uint32_t tcp_relay_node_callback_number; | 115 | uint32_t tcp_relay_node_callback_number; |
116 | 116 | ||
117 | void (*dht_pk_callback)(void *data, int32_t number, const uint8_t *dht_public_key); | 117 | void (*dht_pk_callback)(void *data, int32_t number, const uint8_t *dht_public_key, void *userdata); |
118 | void *dht_pk_callback_object; | 118 | void *dht_pk_callback_object; |
119 | uint32_t dht_pk_callback_number; | 119 | uint32_t dht_pk_callback_number; |
120 | 120 | ||
@@ -122,7 +122,7 @@ typedef struct { | |||
122 | } Onion_Friend; | 122 | } Onion_Friend; |
123 | 123 | ||
124 | typedef int (*oniondata_handler_callback)(void *object, const uint8_t *source_pubkey, const uint8_t *data, | 124 | typedef int (*oniondata_handler_callback)(void *object, const uint8_t *source_pubkey, const uint8_t *data, |
125 | uint16_t len); | 125 | uint16_t len, void *userdata); |
126 | 126 | ||
127 | typedef struct { | 127 | typedef struct { |
128 | DHT *dht; | 128 | DHT *dht; |
@@ -160,7 +160,7 @@ typedef struct { | |||
160 | uint64_t last_packet_recv; | 160 | uint64_t last_packet_recv; |
161 | 161 | ||
162 | unsigned int onion_connected; | 162 | unsigned int onion_connected; |
163 | _Bool UDP_connected; | 163 | bool UDP_connected; |
164 | } Onion_Client; | 164 | } Onion_Client; |
165 | 165 | ||
166 | 166 | ||
@@ -239,7 +239,7 @@ int recv_tcp_relay_handler(Onion_Client *onion_c, int friend_num, int (*tcp_rela | |||
239 | * return 0 on success. | 239 | * return 0 on success. |
240 | */ | 240 | */ |
241 | int onion_dht_pk_callback(Onion_Client *onion_c, int friend_num, void (*function)(void *data, int32_t number, | 241 | int onion_dht_pk_callback(Onion_Client *onion_c, int friend_num, void (*function)(void *data, int32_t number, |
242 | const uint8_t *dht_public_key), void *object, uint32_t number); | 242 | const uint8_t *dht_public_key, void *userdata), void *object, uint32_t number); |
243 | 243 | ||
244 | /* Set a friends DHT public key. | 244 | /* Set a friends DHT public key. |
245 | * timestamp is the time (current_time_monotonic()) at which the key was last confirmed belonging to | 245 | * timestamp is the time (current_time_monotonic()) at which the key was last confirmed belonging to |