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 5b89a8d9..3143f93a 100644 --- a/toxcore/onion_client.h +++ b/toxcore/onion_client.h | |||
@@ -79,7 +79,6 @@ typedef struct { | |||
79 | uint8_t is_online; /* Set by the onion_set_friend_status function. */ | 79 | uint8_t is_online; /* Set by the onion_set_friend_status function. */ |
80 | 80 | ||
81 | uint8_t is_fake_clientid; /* 0 if we don't know the fake client id of the other 1 if we do. */ | 81 | uint8_t is_fake_clientid; /* 0 if we don't know the fake client id of the other 1 if we do. */ |
82 | uint64_t fake_client_id_timestamp; | ||
83 | uint8_t fake_client_id[crypto_box_PUBLICKEYBYTES]; | 82 | uint8_t fake_client_id[crypto_box_PUBLICKEYBYTES]; |
84 | uint8_t real_client_id[crypto_box_PUBLICKEYBYTES]; | 83 | uint8_t real_client_id[crypto_box_PUBLICKEYBYTES]; |
85 | 84 | ||
@@ -218,7 +217,8 @@ int recv_tcp_relay_handler(Onion_Client *onion_c, int friend_num, int (*tcp_rela | |||
218 | * return -1 on failure. | 217 | * return -1 on failure. |
219 | * return 0 on success. | 218 | * return 0 on success. |
220 | */ | 219 | */ |
221 | int onion_dht_pk_callback(Onion_Client *onion_c, int friend_num, void (*function)(void *data, int32_t number, const uint8_t *dht_public_key), void *object, uint32_t number); | 220 | int onion_dht_pk_callback(Onion_Client *onion_c, int friend_num, void (*function)(void *data, int32_t number, |
221 | const uint8_t *dht_public_key), void *object, uint32_t number); | ||
222 | 222 | ||
223 | /* Set a friends DHT public key. | 223 | /* Set a friends DHT public key. |
224 | * timestamp is the time (current_time_monotonic()) at which the key was last confirmed belonging to | 224 | * timestamp is the time (current_time_monotonic()) at which the key was last confirmed belonging to |
@@ -227,14 +227,14 @@ int onion_dht_pk_callback(Onion_Client *onion_c, int friend_num, void (*function | |||
227 | * return -1 on failure. | 227 | * return -1 on failure. |
228 | * return 0 on success. | 228 | * return 0 on success. |
229 | */ | 229 | */ |
230 | int onion_set_friend_DHT_pubkey(Onion_Client *onion_c, int friend_num, const uint8_t *dht_key, uint64_t timestamp); | 230 | int onion_set_friend_DHT_pubkey(Onion_Client *onion_c, int friend_num, const uint8_t *dht_key); |
231 | 231 | ||
232 | /* Copy friends DHT public key into dht_key. | 232 | /* Copy friends DHT public key into dht_key. |
233 | * | 233 | * |
234 | * return 0 on failure (no key copied). | 234 | * return 0 on failure (no key copied). |
235 | * return timestamp on success (key copied). | 235 | * return 1 on success (key copied). |
236 | */ | 236 | */ |
237 | uint64_t onion_getfriend_DHT_pubkey(const Onion_Client *onion_c, int friend_num, uint8_t *dht_key); | 237 | unsigned int onion_getfriend_DHT_pubkey(const Onion_Client *onion_c, int friend_num, uint8_t *dht_key); |
238 | 238 | ||
239 | #define ONION_DATA_IN_RESPONSE_MIN_SIZE (crypto_box_PUBLICKEYBYTES + crypto_box_MACBYTES) | 239 | #define ONION_DATA_IN_RESPONSE_MIN_SIZE (crypto_box_PUBLICKEYBYTES + crypto_box_MACBYTES) |
240 | #define ONION_CLIENT_MAX_DATA_SIZE (MAX_DATA_REQUEST_SIZE - ONION_DATA_IN_RESPONSE_MIN_SIZE) | 240 | #define ONION_CLIENT_MAX_DATA_SIZE (MAX_DATA_REQUEST_SIZE - ONION_DATA_IN_RESPONSE_MIN_SIZE) |