summaryrefslogtreecommitdiff
path: root/toxcore/tox.c
diff options
context:
space:
mode:
authorGregory Mullen (grayhatter) <greg@grayhatter.com>2016-08-22 14:44:58 -0700
committerGregory Mullen (grayhatter) <greg@grayhatter.com>2016-09-06 02:22:04 -0700
commitaad1e0ad3f96786e0fb10d8dd144e5e6ebe93258 (patch)
tree963477c57148626140286ac278369ef3af60811f /toxcore/tox.c
parente7d3a1a665d1204d15b00fdbe6716b43d8ef3b4a (diff)
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.
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r--toxcore/tox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c
index 40bfaf70..26fa0de4 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -476,7 +476,7 @@ void tox_iterate(Tox *tox, void *user_data)
476{ 476{
477 Messenger *m = tox; 477 Messenger *m = tox;
478 do_messenger(m, user_data); 478 do_messenger(m, user_data);
479 do_groupchats(m->group_chat_object); 479 do_groupchats(m->group_chat_object, user_data);
480} 480}
481 481
482void tox_self_get_address(const Tox *tox, uint8_t *address) 482void tox_self_get_address(const Tox *tox, uint8_t *address)
@@ -963,10 +963,10 @@ void tox_callback_friend_read_receipt(Tox *tox, tox_friend_read_receipt_cb *call
963 m_callback_read_receipt(m, callback); 963 m_callback_read_receipt(m, callback);
964} 964}
965 965
966void tox_callback_friend_request(Tox *tox, tox_friend_request_cb *callback, void *user_data) 966void tox_callback_friend_request(Tox *tox, tox_friend_request_cb *callback)
967{ 967{
968 Messenger *m = tox; 968 Messenger *m = tox;
969 m_callback_friendrequest(m, callback, user_data); 969 m_callback_friendrequest(m, callback);
970} 970}
971 971
972void tox_callback_friend_message(Tox *tox, tox_friend_message_cb *callback) 972void tox_callback_friend_message(Tox *tox, tox_friend_message_cb *callback)