Skip to content

Commit

Permalink
fix: remove function all together and make it inline
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Jan 19, 2024
1 parent d60aa5a commit 279a078
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion other/bootstrap_daemon/docker/tox-bootstrapd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3acc3a1f08e67dac66d91657a36d98be397fa3f14bc4798d3349605e37a90fc3 /usr/local/bin/tox-bootstrapd
7c8a322c4d6ec0e26c5f8aa017ede9d39a306f1e3590928728623ab48e29f8b8 /usr/local/bin/tox-bootstrapd
8 changes: 1 addition & 7 deletions toxcore/group_chats.c
Original file line number Diff line number Diff line change
Expand Up @@ -5020,12 +5020,6 @@ static bool custom_gc_packet_length_is_valid(uint16_t length, bool lossless)
return true;
}

/** @brief Returns false if a custom incoming (non private) packet is too large. */
static bool custom_gc_incoming_non_private_packet_length_is_valid(uint16_t length, bool lossless)
{
return length <= (lossless ? MAX_GC_CUSTOM_LOSSLESS_INCOMING_ASSEMBLED_PACKET_SIZE : MAX_GC_CUSTOM_LOSSY_PACKET_SIZE);
}

int gc_send_custom_private_packet(const GC_Chat *chat, bool lossless, uint32_t peer_id, const uint8_t *message,
uint16_t length)
{
Expand Down Expand Up @@ -5124,7 +5118,7 @@ non_null(1, 2, 3, 4) nullable(7)
static int handle_gc_custom_packet(const GC_Session *c, const GC_Chat *chat, const GC_Peer *peer, const uint8_t *data,
uint16_t length, bool lossless, void *userdata)
{
if (!custom_gc_incoming_non_private_packet_length_is_valid(length, lossless)) {
if (!(length <= (lossless ? MAX_GC_CUSTOM_LOSSLESS_INCOMING_ASSEMBLED_PACKET_SIZE : MAX_GC_CUSTOM_LOSSY_PACKET_SIZE))) {
return -1;
}

Expand Down

0 comments on commit 279a078

Please sign in to comment.