From d497bfe5336e9714d3ecc53378cb1b1280974786 Mon Sep 17 00:00:00 2001 From: "Gregory Mullen (grayhatter)" Date: Sun, 18 Sep 2016 18:48:53 -0700 Subject: [PATCH] Added UB comment r/t deleting a friend w/ active call --- toxcore/Messenger.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 90a3a9e8..9edf2132 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -413,6 +413,11 @@ int m_delfriend(Messenger *m, int32_t friendnumber) } if (m->friend_connectionstatuschange_internal) { + // This is a direct callback to tell ToxAV that the friend has disconnected. + // The userdata in this callback is set to NULL, which will be passed back + // to the user if there is an active call. This behavior is expected, as the + // plan as of this commit is to update toxcore to ONLY send callbacks with + // tox_iterate(). m->friend_connectionstatuschange_internal(m, friendnumber, 0, m->friend_connectionstatuschange_internal_userdata, NULL); }