From 5db1ff0c224b88e0d545f6e6e2858ceb638893ac Mon Sep 17 00:00:00 2001 From: aunsane Date: Sat, 21 Jul 2018 13:14:47 +0300 Subject: Tox: libtox update to v0.2.4 --- protocols/Tox/libtox/src/toxcore/tox.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'protocols/Tox/libtox/src/toxcore/tox.c') diff --git a/protocols/Tox/libtox/src/toxcore/tox.c b/protocols/Tox/libtox/src/toxcore/tox.c index cae2dcb36b..80ff42c343 100644 --- a/protocols/Tox/libtox/src/toxcore/tox.c +++ b/protocols/Tox/libtox/src/toxcore/tox.c @@ -1522,7 +1522,9 @@ bool tox_friend_send_lossy_packet(Tox *tox, uint32_t friend_number, const uint8_ return 0; } - if (data[0] < (PACKET_ID_LOSSY_RANGE_START + PACKET_LOSSY_AV_RESERVED)) { + // TODO(oxij): this feels ugly, this is needed only because m_send_custom_lossy_packet in Messenger.c + // sends both AV and custom packets despite its name and this API hides those AV packets + if (data[0] <= PACKET_ID_RANGE_LOSSY_AV_END) { SET_ERROR_PARAMETER(error, TOX_ERR_FRIEND_CUSTOM_PACKET_INVALID); return 0; } -- cgit v1.2.3