mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed some warnings.
This commit is contained in:
parent
750c75a47d
commit
881b2d900d
|
@ -28,7 +28,7 @@ void do_onion(Onion *onion)
|
|||
}
|
||||
|
||||
static int handled_test_1;
|
||||
static int handle_test_1(void *object, IP_Port source, uint8_t *packet, uint32_t length)
|
||||
static int handle_test_1(void *object, IP_Port source, const uint8_t *packet, uint32_t length)
|
||||
{
|
||||
Onion *onion = object;
|
||||
|
||||
|
@ -44,7 +44,7 @@ static int handle_test_1(void *object, IP_Port source, uint8_t *packet, uint32_t
|
|||
}
|
||||
|
||||
static int handled_test_2;
|
||||
static int handle_test_2(void *object, IP_Port source, uint8_t *packet, uint32_t length)
|
||||
static int handle_test_2(void *object, IP_Port source, const uint8_t *packet, uint32_t length)
|
||||
{
|
||||
if (length != sizeof("install Gentoo"))
|
||||
return 1;
|
||||
|
@ -70,7 +70,7 @@ uint8_t sb_data[ONION_ANNOUNCE_SENDBACK_DATA_LENGTH];
|
|||
static int handled_test_3;
|
||||
uint8_t test_3_pub_key[crypto_box_PUBLICKEYBYTES];
|
||||
uint8_t test_3_ping_id[crypto_hash_sha256_BYTES];
|
||||
static int handle_test_3(void *object, IP_Port source, uint8_t *packet, uint32_t length)
|
||||
static int handle_test_3(void *object, IP_Port source, const uint8_t *packet, uint32_t length)
|
||||
{
|
||||
Onion *onion = object;
|
||||
|
||||
|
@ -99,7 +99,7 @@ static int handle_test_3(void *object, IP_Port source, uint8_t *packet, uint32_t
|
|||
|
||||
uint8_t nonce[crypto_box_NONCEBYTES];
|
||||
static int handled_test_4;
|
||||
static int handle_test_4(void *object, IP_Port source, uint8_t *packet, uint32_t length)
|
||||
static int handle_test_4(void *object, IP_Port source, const uint8_t *packet, uint32_t length)
|
||||
{
|
||||
Onion *onion = object;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ static uint16_t bootstrap_motd_length;
|
|||
/* To request this packet just send a packet of length INFO_REQUEST_PACKET_LENGTH
|
||||
* with the first byte being BOOTSTRAP_INFO_PACKET_ID
|
||||
*/
|
||||
static int handle_info_request(void *object, IP_Port source, uint8_t *packet, uint32_t length)
|
||||
static int handle_info_request(void *object, IP_Port source, const uint8_t *packet, uint32_t length)
|
||||
{
|
||||
if (length != INFO_REQUEST_PACKET_LENGTH)
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user