summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxcore/Messenger.c4
-rw-r--r--toxcore/Messenger.h8
-rw-r--r--toxcore/tox.c8
3 files changed, 10 insertions, 10 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index b745d99b..a702793c 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -1824,7 +1824,7 @@ static int m_handle_lossy_packet(void *object, int friend_num, const uint8_t *pa
1824 } 1824 }
1825 1825
1826 if (m->lossy_packethandler) { 1826 if (m->lossy_packethandler) {
1827 m->lossy_packethandler(m, friend_num, packet, length, userdata); 1827 m->lossy_packethandler(m, friend_num, packet[0], packet, length, userdata);
1828 } 1828 }
1829 1829
1830 return 1; 1830 return 1;
@@ -1900,7 +1900,7 @@ static int handle_custom_lossless_packet(void *object, int friend_num, const uin
1900 } 1900 }
1901 1901
1902 if (m->lossless_packethandler) { 1902 if (m->lossless_packethandler) {
1903 m->lossless_packethandler(m, friend_num, packet, length, userdata); 1903 m->lossless_packethandler(m, friend_num, packet[0], packet, length, userdata);
1904 } 1904 }
1905 1905
1906 return 1; 1906 return 1;
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h
index a3376e23..f6fb3d56 100644
--- a/toxcore/Messenger.h
+++ b/toxcore/Messenger.h
@@ -200,10 +200,10 @@ typedef void m_file_chunk_request_cb(Messenger *m, uint32_t friend_number, uint3
200 size_t length, void *user_data); 200 size_t length, void *user_data);
201typedef void m_file_recv_chunk_cb(Messenger *m, uint32_t friend_number, uint32_t file_number, uint64_t position, 201typedef void m_file_recv_chunk_cb(Messenger *m, uint32_t friend_number, uint32_t file_number, uint64_t position,
202 const uint8_t *data, size_t length, void *user_data); 202 const uint8_t *data, size_t length, void *user_data);
203typedef void m_friend_lossy_packet_cb(Messenger *m, uint32_t friend_number, const uint8_t *data, size_t length, 203typedef void m_friend_lossy_packet_cb(Messenger *m, uint32_t friend_number, uint8_t packet_id, const uint8_t *data,
204 void *user_data); 204 size_t length, void *user_data);
205typedef void m_friend_lossless_packet_cb(Messenger *m, uint32_t friend_number, const uint8_t *data, size_t length, 205typedef void m_friend_lossless_packet_cb(Messenger *m, uint32_t friend_number, uint8_t packet_id, const uint8_t *data,
206 void *user_data); 206 size_t length, void *user_data);
207typedef void m_friend_connectionstatuschange_internal_cb(Messenger *m, uint32_t friend_number, 207typedef void m_friend_connectionstatuschange_internal_cb(Messenger *m, uint32_t friend_number,
208 uint8_t connection_status, void *user_data); 208 uint8_t connection_status, void *user_data);
209typedef void m_conference_invite_cb(Messenger *m, uint32_t friend_number, const uint8_t *cookie, uint16_t length, 209typedef void m_conference_invite_cb(Messenger *m, uint32_t friend_number, const uint8_t *cookie, uint16_t length,
diff --git a/toxcore/tox.c b/toxcore/tox.c
index 0a575dbf..530035f7 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -302,8 +302,8 @@ static void tox_conference_peer_list_changed_handler(Messenger *m, uint32_t conf
302 } 302 }
303} 303}
304 304
305static void tox_friend_lossy_packet_handler(Messenger *m, uint32_t friend_number, const uint8_t *data, size_t length, 305static void tox_friend_lossy_packet_handler(Messenger *m, uint32_t friend_number, uint8_t packet_id,
306 void *user_data) 306 const uint8_t *data, size_t length, void *user_data)
307{ 307{
308 struct Tox_Userdata *tox_data = (struct Tox_Userdata *)user_data; 308 struct Tox_Userdata *tox_data = (struct Tox_Userdata *)user_data;
309 309
@@ -312,8 +312,8 @@ static void tox_friend_lossy_packet_handler(Messenger *m, uint32_t friend_number
312 } 312 }
313} 313}
314 314
315static void tox_friend_lossless_packet_handler(Messenger *m, uint32_t friend_number, const uint8_t *data, size_t length, 315static void tox_friend_lossless_packet_handler(Messenger *m, uint32_t friend_number, uint8_t packet_id,
316 void *user_data) 316 const uint8_t *data, size_t length, void *user_data)
317{ 317{
318 struct Tox_Userdata *tox_data = (struct Tox_Userdata *)user_data; 318 struct Tox_Userdata *tox_data = (struct Tox_Userdata *)user_data;
319 319