diff options
author | iphydf <iphydf@users.noreply.github.com> | 2020-03-07 14:21:54 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2020-03-08 19:17:50 +0000 |
commit | bd7b7fadbacbb84144ed2160109befa106623d5d (patch) | |
tree | cb902a4983273b999ab054efa74b8ef28fbce85f /toxcore/tox.c | |
parent | 7b3d2eda3f8b4bc221215875a3d813654e044a55 (diff) |
Pass packet ID to custom packet handlers.
We don't expose this to the user code, yet, because it would break the
API, but this is useful for future internal code.
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r-- | toxcore/tox.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 | ||
305 | static void tox_friend_lossy_packet_handler(Messenger *m, uint32_t friend_number, const uint8_t *data, size_t length, | 305 | static 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 | ||
315 | static void tox_friend_lossless_packet_handler(Messenger *m, uint32_t friend_number, const uint8_t *data, size_t length, | 315 | static 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 | ||