diff --git a/auto_tests/onion_test.c b/auto_tests/onion_test.c index 4489a894..2394e03d 100644 --- a/auto_tests/onion_test.c +++ b/auto_tests/onion_test.c @@ -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; diff --git a/other/bootstrap_node_packets.c b/other/bootstrap_node_packets.c index ea57b0d2..e8df3289 100644 --- a/other/bootstrap_node_packets.c +++ b/other/bootstrap_node_packets.c @@ -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;