mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Const correctness in toxcore/onion_client.c
This commit is contained in:
parent
6d7a4d3746
commit
5a34595f58
|
@ -530,7 +530,7 @@ static int handle_fakeid_announce(void *object, const uint8_t *source_pubkey, co
|
|||
* return the number of packets sent on success
|
||||
* return -1 on failure.
|
||||
*/
|
||||
int send_onion_data(Onion_Client *onion_c, int friend_num, uint8_t *data, uint32_t length)
|
||||
int send_onion_data(const Onion_Client *onion_c, int friend_num, const uint8_t *data, uint32_t length)
|
||||
{
|
||||
if ((uint32_t)friend_num >= onion_c->num_friends)
|
||||
return -1;
|
||||
|
|
|
@ -212,7 +212,7 @@ uint64_t onion_getfriend_DHT_pubkey(Onion_Client *onion_c, int friend_num, uint8
|
|||
* return the number of packets sent on success
|
||||
* return -1 on failure.
|
||||
*/
|
||||
int send_onion_data(Onion_Client *onion_c, int friend_num, uint8_t *data, uint32_t length);
|
||||
int send_onion_data(const Onion_Client *onion_c, int friend_num, const uint8_t *data, uint32_t length);
|
||||
|
||||
/* Function to call when onion data packet with contents beginning with byte is received. */
|
||||
void oniondata_registerhandler(Onion_Client *onion_c, uint8_t byte, oniondata_handler_callback cb, void *object);
|
||||
|
|
Loading…
Reference in New Issue
Block a user