summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.h
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/Messenger.h
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/Messenger.h')
-rw-r--r--toxcore/Messenger.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h
index a59f8c4e..dc809a22 100644
--- a/toxcore/Messenger.h
+++ b/toxcore/Messenger.h
@@ -472,7 +472,7 @@ void m_callback_log(Messenger *m, logger_cb *function, void *userdata);
472 * Function format is function(uint8_t * public_key, uint8_t * data, size_t length) 472 * Function format is function(uint8_t * public_key, uint8_t * data, size_t length)
473 */ 473 */
474void m_callback_friendrequest(Messenger *m, void (*function)(Messenger *m, const uint8_t *, const uint8_t *, size_t, 474void m_callback_friendrequest(Messenger *m, void (*function)(Messenger *m, const uint8_t *, const uint8_t *, size_t,
475 void *), void *userdata); 475 void *));
476 476
477/* Set the function that will be executed when a message from a friend is received. 477/* Set the function that will be executed when a message from a friend is received.
478 * Function format is: function(uint32_t friendnumber, unsigned int type, uint8_t * message, uint32_t length) 478 * Function format is: function(uint32_t friendnumber, unsigned int type, uint8_t * message, uint32_t length)