diff options
Diffstat (limited to 'toxcore/onion_client.c')
-rw-r--r-- | toxcore/onion_client.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 1fe54d85..ae5e8810 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c | |||
@@ -164,7 +164,7 @@ static int new_sendback(Onion_Client *onion_c, uint32_t num, uint8_t *public_key | |||
164 | * return ~0 on failure | 164 | * return ~0 on failure |
165 | * return num (see new_sendback(...)) on success | 165 | * return num (see new_sendback(...)) on success |
166 | */ | 166 | */ |
167 | static uint32_t check_sendback(Onion_Client *onion_c, uint8_t *sendback, uint8_t *ret_pubkey, IP_Port *ret_ip_port) | 167 | static uint32_t check_sendback(Onion_Client *onion_c, const uint8_t *sendback, uint8_t *ret_pubkey, IP_Port *ret_ip_port) |
168 | { | 168 | { |
169 | uint64_t sback; | 169 | uint64_t sback; |
170 | memcpy(&sback, sendback, sizeof(uint64_t)); | 170 | memcpy(&sback, sendback, sizeof(uint64_t)); |
@@ -377,7 +377,7 @@ static int client_ping_nodes(Onion_Client *onion_c, uint32_t num, Node_format *n | |||
377 | return 0; | 377 | return 0; |
378 | } | 378 | } |
379 | 379 | ||
380 | static int handle_announce_response(void *object, IP_Port source, uint8_t *packet, uint32_t length) | 380 | static int handle_announce_response(void *object, IP_Port source, const uint8_t *packet, uint32_t length) |
381 | { | 381 | { |
382 | Onion_Client *onion_c = object; | 382 | Onion_Client *onion_c = object; |
383 | 383 | ||
@@ -432,7 +432,7 @@ static int handle_announce_response(void *object, IP_Port source, uint8_t *packe | |||
432 | 432 | ||
433 | #define DATA_IN_RESPONSE_MIN_SIZE ONION_DATA_IN_RESPONSE_MIN_SIZE | 433 | #define DATA_IN_RESPONSE_MIN_SIZE ONION_DATA_IN_RESPONSE_MIN_SIZE |
434 | 434 | ||
435 | static int handle_data_response(void *object, IP_Port source, uint8_t *packet, uint32_t length) | 435 | static int handle_data_response(void *object, IP_Port source, const uint8_t *packet, uint32_t length) |
436 | { | 436 | { |
437 | Onion_Client *onion_c = object; | 437 | Onion_Client *onion_c = object; |
438 | 438 | ||
@@ -530,7 +530,7 @@ static int handle_fakeid_announce(void *object, const uint8_t *source_pubkey, co | |||
530 | * return the number of packets sent on success | 530 | * return the number of packets sent on success |
531 | * return -1 on failure. | 531 | * return -1 on failure. |
532 | */ | 532 | */ |
533 | int send_onion_data(Onion_Client *onion_c, int friend_num, uint8_t *data, uint32_t length) | 533 | int send_onion_data(const Onion_Client *onion_c, int friend_num, const uint8_t *data, uint32_t length) |
534 | { | 534 | { |
535 | if ((uint32_t)friend_num >= onion_c->num_friends) | 535 | if ((uint32_t)friend_num >= onion_c->num_friends) |
536 | return -1; | 536 | return -1; |