forked from Green-Sky/tomato
Squashed 'external/toxcore/c-toxcore/' changes from 73d9b845a3..e2c01e457b
e2c01e457b refactor: Use enum-specific pack functions for enum values. afc472402b refactor: Factor out union pack switch from event packer. 6caa7ce4b1 cleanup: Move the 2-element array pack out of individual events. 687af81f20 cleanup: Remove empty test doing nothing. fcf5882428 test: Add printf log statement to group_moderation_test. b4d8826228 cleanup: Remove old type-ordered event getters. 8c35e0fefb feat: add ngc events 97bdd83937 refactor: Make event dispatch ordered by receive time. 001d00ab30 fix: dont resolve to ipv6 addresses when its disabled d3b935f63f fix(test): tests use ipv6 by default, even with USE_IPV6 set to 0 29fc5ea1f7 chore: add clangd files to .gitignore d30c81acbc refactor: Move file streaming test to its own file. acdc67387b fix(ci): window builds now build in parallel REVERT: 73d9b845a3 cleanup: Remove old type-ordered event getters. REVERT: b0840cc02d feat: add ngc events REVERT: 7df9a51349 refactor: Make event dispatch ordered by receive time. git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: e2c01e457bfb8a59537175c8fe17ca9ab1c9e3e1
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
#include "../mem.h"
|
||||
#include "../tox.h"
|
||||
#include "../tox_events.h"
|
||||
#include "../tox_pack.h"
|
||||
#include "../tox_unpack.h"
|
||||
|
||||
|
||||
@ -55,10 +56,7 @@ static void tox_event_self_connection_status_destruct(Tox_Event_Self_Connection_
|
||||
bool tox_event_self_connection_status_pack(
|
||||
const Tox_Event_Self_Connection_Status *event, Bin_Pack *bp)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
return bin_pack_array(bp, 2)
|
||||
&& bin_pack_u32(bp, TOX_EVENT_SELF_CONNECTION_STATUS)
|
||||
&& bin_pack_u32(bp, event->connection_status);
|
||||
return tox_connection_pack(event->connection_status, bp);
|
||||
}
|
||||
|
||||
non_null()
|
||||
@ -66,7 +64,7 @@ static bool tox_event_self_connection_status_unpack_into(
|
||||
Tox_Event_Self_Connection_Status *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
return tox_connection_unpack(bu, &event->connection_status);
|
||||
return tox_connection_unpack(&event->connection_status, bu);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user