From aad1e0ad3f96786e0fb10d8dd144e5e6ebe93258 Mon Sep 17 00:00:00 2001 From: "Gregory Mullen (grayhatter)" Date: Mon, 22 Aug 2016 14:44:58 -0700 Subject: Make friend requests stateless Messenger is slightly twisty when it comes to sending connection status callbacks It will very likely need at the very least a partial refactor to clean it up a bit. Toxcore shouldn't need void *userdata as deep as is currently does. (amend 1) Because of the nature of toxcore connection callbacks, I decided to change this commit from statelessness for connections changes to statelessness for friend requests. It's simpler this was and doesn't include doing anything foolish in the time between commits. group fixup because grayhatter doesn't want to do it "arguably correct" is not how you write security sensitive code Clear a compiler warning about types within a function. --- auto_tests/encryptsave_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'auto_tests/encryptsave_test.c') diff --git a/auto_tests/encryptsave_test.c b/auto_tests/encryptsave_test.c index 99a5792e..02a29016 100644 --- a/auto_tests/encryptsave_test.c +++ b/auto_tests/encryptsave_test.c @@ -60,7 +60,7 @@ START_TEST(test_save_friend) Tox *tox2 = tox_new(0, 0); ck_assert_msg(tox1 || tox2, "Failed to create 2 tox instances"); uint32_t to_compare = 974536; - tox_callback_friend_request(tox2, accept_friend_request, &to_compare); + tox_callback_friend_request(tox2, accept_friend_request); uint8_t address[TOX_ADDRESS_SIZE]; tox_self_get_address(tox2, address); uint32_t test = tox_friend_add(tox1, address, (uint8_t *)"Gentoo", 7, 0); -- cgit v1.2.3