diff options
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 6b81427c..692d3d0e 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -718,6 +718,14 @@ void m_callback_connectionstatus(Messenger *m, void (*function)(Messenger *m, in | |||
718 | m->friend_connectionstatuschange = function; | 718 | m->friend_connectionstatuschange = function; |
719 | m->friend_connectionstatuschange_userdata = userdata; | 719 | m->friend_connectionstatuschange_userdata = userdata; |
720 | } | 720 | } |
721 | |||
722 | void m_callback_connectionstatus_internal_av(Messenger *m, void (*function)(Messenger *m, int, uint8_t, void *), | ||
723 | void *userdata) | ||
724 | { | ||
725 | m->friend_connectionstatuschange_internal = function; | ||
726 | m->friend_connectionstatuschange_internal_userdata = userdata; | ||
727 | } | ||
728 | |||
721 | static void break_files(Messenger *m, int friendnumber); | 729 | static void break_files(Messenger *m, int friendnumber); |
722 | static void check_friend_connectionstatus(Messenger *m, int friendnumber, uint8_t status) | 730 | static void check_friend_connectionstatus(Messenger *m, int friendnumber, uint8_t status) |
723 | { | 731 | { |
@@ -739,6 +747,10 @@ static void check_friend_connectionstatus(Messenger *m, int friendnumber, uint8_ | |||
739 | 747 | ||
740 | if (m->friend_connectionstatuschange) | 748 | if (m->friend_connectionstatuschange) |
741 | m->friend_connectionstatuschange(m, friendnumber, is_online, m->friend_connectionstatuschange_userdata); | 749 | m->friend_connectionstatuschange(m, friendnumber, is_online, m->friend_connectionstatuschange_userdata); |
750 | |||
751 | if (m->friend_connectionstatuschange_internal) | ||
752 | m->friend_connectionstatuschange_internal(m, friendnumber, is_online, | ||
753 | m->friend_connectionstatuschange_internal_userdata); | ||
742 | } | 754 | } |
743 | } | 755 | } |
744 | 756 | ||