summaryrefslogtreecommitdiff
path: root/auto_tests
diff options
context:
space:
mode:
Diffstat (limited to 'auto_tests')
-rw-r--r--auto_tests/TCP_test.c6
-rw-r--r--auto_tests/tox_test.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/auto_tests/TCP_test.c b/auto_tests/TCP_test.c
index ca5afd9a..8e75fae0 100644
--- a/auto_tests/TCP_test.c
+++ b/auto_tests/TCP_test.c
@@ -294,7 +294,7 @@ END_TEST
294static int response_callback_good; 294static int response_callback_good;
295static uint8_t response_callback_connection_id; 295static uint8_t response_callback_connection_id;
296static uint8_t response_callback_public_key[crypto_box_PUBLICKEYBYTES]; 296static uint8_t response_callback_public_key[crypto_box_PUBLICKEYBYTES];
297static int response_callback(void *object, uint8_t connection_id, uint8_t *public_key) 297static int response_callback(void *object, uint8_t connection_id, const uint8_t *public_key)
298{ 298{
299 if (set_tcp_connection_number(object - 2, connection_id, 7) != 0) 299 if (set_tcp_connection_number(object - 2, connection_id, 7) != 0)
300 return 1; 300 return 1;
@@ -321,7 +321,7 @@ static int status_callback(void *object, uint32_t number, uint8_t connection_id,
321 return 0; 321 return 0;
322} 322}
323static int data_callback_good; 323static int data_callback_good;
324static int data_callback(void *object, uint32_t number, uint8_t connection_id, uint8_t *data, uint16_t length) 324static int data_callback(void *object, uint32_t number, uint8_t connection_id, const uint8_t *data, uint16_t length)
325{ 325{
326 if (object != (void *)3) 326 if (object != (void *)3)
327 return 1; 327 return 1;
@@ -342,7 +342,7 @@ static int data_callback(void *object, uint32_t number, uint8_t connection_id, u
342 342
343static int oob_data_callback_good; 343static int oob_data_callback_good;
344static uint8_t oob_pubkey[crypto_box_PUBLICKEYBYTES]; 344static uint8_t oob_pubkey[crypto_box_PUBLICKEYBYTES];
345static int oob_data_callback(void *object, uint8_t *public_key, uint8_t *data, uint16_t length) 345static int oob_data_callback(void *object, const uint8_t *public_key, const uint8_t *data, uint16_t length)
346{ 346{
347 if (object != (void *)4) 347 if (object != (void *)4)
348 return 1; 348 return 1;
diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c
index f8da8560..1a3c5868 100644
--- a/auto_tests/tox_test.c
+++ b/auto_tests/tox_test.c
@@ -30,7 +30,7 @@ void accept_friend_request(Tox *m, const uint8_t *public_key, const uint8_t *dat
30} 30}
31uint32_t messages_received; 31uint32_t messages_received;
32 32
33void print_message(Tox *m, int friendnumber, uint8_t *string, uint16_t length, void *userdata) 33void print_message(Tox *m, int friendnumber, const uint8_t *string, uint16_t length, void *userdata)
34{ 34{
35 if (*((uint32_t *)userdata) != 974536) 35 if (*((uint32_t *)userdata) != 974536)
36 return; 36 return;
@@ -44,7 +44,7 @@ void print_message(Tox *m, int friendnumber, uint8_t *string, uint16_t length, v
44 44
45uint32_t name_changes; 45uint32_t name_changes;
46 46
47void print_nickchange(Tox *m, int friendnumber, uint8_t *string, uint16_t length, void *userdata) 47void print_nickchange(Tox *m, int friendnumber, const uint8_t *string, uint16_t length, void *userdata)
48{ 48{
49 if (*((uint32_t *)userdata) != 974536) 49 if (*((uint32_t *)userdata) != 974536)
50 return; 50 return;
@@ -69,7 +69,7 @@ void print_typingchange(Tox *m, int friendnumber, uint8_t typing, void *userdata
69uint8_t filenum; 69uint8_t filenum;
70uint32_t file_accepted; 70uint32_t file_accepted;
71uint64_t file_size; 71uint64_t file_size;
72void file_request_accept(Tox *m, int friendnumber, uint8_t filenumber, uint64_t filesize, uint8_t *filename, 72void file_request_accept(Tox *m, int friendnumber, uint8_t filenumber, uint64_t filesize, const uint8_t *filename,
73 uint16_t filename_length, void *userdata) 73 uint16_t filename_length, void *userdata)
74{ 74{
75 if (*((uint32_t *)userdata) != 974536) 75 if (*((uint32_t *)userdata) != 974536)
@@ -85,7 +85,7 @@ void file_request_accept(Tox *m, int friendnumber, uint8_t filenumber, uint64_t
85uint32_t file_sent; 85uint32_t file_sent;
86uint32_t sendf_ok; 86uint32_t sendf_ok;
87void file_print_control(Tox *m, int friendnumber, uint8_t send_recieve, uint8_t filenumber, uint8_t control_type, 87void file_print_control(Tox *m, int friendnumber, uint8_t send_recieve, uint8_t filenumber, uint8_t control_type,
88 uint8_t *data, uint16_t length, void *userdata) 88 const uint8_t *data, uint16_t length, void *userdata)
89{ 89{
90 if (*((uint32_t *)userdata) != 974536) 90 if (*((uint32_t *)userdata) != 974536)
91 return; 91 return;
@@ -100,7 +100,7 @@ void file_print_control(Tox *m, int friendnumber, uint8_t send_recieve, uint8_t
100 100
101uint64_t size_recv; 101uint64_t size_recv;
102uint8_t num; 102uint8_t num;
103void write_file(Tox *m, int friendnumber, uint8_t filenumber, uint8_t *data, uint16_t length, void *userdata) 103void write_file(Tox *m, int friendnumber, uint8_t filenumber, const uint8_t *data, uint16_t length, void *userdata)
104{ 104{
105 if (*((uint32_t *)userdata) != 974536) 105 if (*((uint32_t *)userdata) != 974536)
106 return; 106 return;