summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r--toxcore/Messenger.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index e48fa5fc..7ce6bb3c 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -721,9 +721,11 @@ void m_set_sends_receipts(Messenger *m, int32_t friendnumber, int yesno)
721 721
722/* static void (*friend_request)(uint8_t *, uint8_t *, uint16_t); */ 722/* static void (*friend_request)(uint8_t *, uint8_t *, uint16_t); */
723/* Set the function that will be executed when a friend request is received. */ 723/* Set the function that will be executed when a friend request is received. */
724void m_callback_friendrequest(Messenger *m, void (*function)(uint8_t *, uint8_t *, uint16_t, void *), void *userdata) 724void m_callback_friendrequest(Messenger *m, void (*function)(Messenger *m, uint8_t *, uint8_t *, uint16_t, void *),
725 void *userdata)
725{ 726{
726 callback_friendrequest(&(m->fr), function, userdata); 727 void (*handle_friendrequest)(void *, uint8_t *, uint8_t *, uint16_t, void *) = function;
728 callback_friendrequest(&(m->fr), handle_friendrequest, m, userdata);
727} 729}
728 730
729/* Set the function that will be executed when a message from a friend is received. */ 731/* Set the function that will be executed when a message from a friend is received. */