diff --git a/auto_tests/toxav_basic_test.c b/auto_tests/toxav_basic_test.c index c35af2705..ce3185dec 100644 --- a/auto_tests/toxav_basic_test.c +++ b/auto_tests/toxav_basic_test.c @@ -50,7 +50,7 @@ typedef struct _Status { /* My default settings */ static ToxAvCodecSettings muhcaps; -void accept_friend_request(Tox *m, uint8_t *public_key, uint8_t *data, uint16_t length, void *userdata) +void accept_friend_request(Tox *m, const uint8_t *public_key, const uint8_t *data, uint16_t length, void *userdata) { if (length == 7 && memcmp("gentoo", data, 7) == 0) { tox_add_friend_norequest(m, public_key); diff --git a/toxcore/tox.c b/toxcore/tox.c index 008440a4e..79e4c042c 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c @@ -72,7 +72,7 @@ int32_t tox_add_friend(Tox *tox, uint8_t *address, uint8_t *data, uint16_t lengt * return the friend number if success. * return -1 if failure. */ -int32_t tox_add_friend_norequest(Tox *tox, uint8_t *client_id) +int32_t tox_add_friend_norequest(Tox *tox, const uint8_t *client_id) { Messenger *m = tox; return m_addfriend_norequest(m, client_id); diff --git a/toxcore/tox.h b/toxcore/tox.h index f0390fe19..afa502f55 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h @@ -107,7 +107,7 @@ int32_t tox_add_friend(Tox *tox, uint8_t *address, uint8_t *data, uint16_t lengt * return the friend number if success. * return -1 if failure. */ -int32_t tox_add_friend_norequest(Tox *tox, uint8_t *client_id); +int32_t tox_add_friend_norequest(Tox *tox, const uint8_t *client_id); /* return the friend number associated to that client id. return -1 if no such friend */