Skip to content

Commit 2d29ce9

Browse files
authored
Merge pull request #18 from tearfur/ftbfs-log
fix: FTBFS when `UTP_DEBUG_LOGGING` is defined
2 parents 6c7ee3f + 1e7e6c6 commit 2d29ce9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utp_internal.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2926,14 +2926,14 @@ int utp_process_udp(utp_context *ctx, const byte *buffer, size_t len, const stru
29262926
if (ctx->rst_info.size() > RST_INFO_LIMIT) {
29272927

29282928
#if UTP_DEBUG_LOGGING
2929-
ctx->log(UTP_LOG_DEBUG, NULL, "recv not sending RST to non-SYN (limit at %u stored)", (uint)ctx->rst_info.GetCount());
2929+
ctx->log(UTP_LOG_DEBUG, NULL, "recv not sending RST to non-SYN (limit at %tu stored)", std::size(ctx->rst_info));
29302930
#endif
29312931

29322932
return 1;
29332933
}
29342934

29352935
#if UTP_DEBUG_LOGGING
2936-
ctx->log(UTP_LOG_DEBUG, NULL, "recv send RST to non-SYN (%u stored)", (uint)ctx->rst_info.GetCount());
2936+
ctx->log(UTP_LOG_DEBUG, NULL, "recv send RST to non-SYN (%tu stored)", std::size(ctx->rst_info));
29372937
#endif
29382938

29392939
ctx->rst_info.emplace_back(addr, id, seq_nr, ctx->current_ms);
@@ -2960,7 +2960,7 @@ int utp_process_udp(utp_context *ctx, const byte *buffer, size_t len, const stru
29602960
if (ctx->utp_sockets.size() > 3000) {
29612961

29622962
#if UTP_DEBUG_LOGGING
2963-
ctx->log(UTP_LOG_DEBUG, NULL, "rejected incoming connection, too many uTP sockets %d", ctx->utp_sockets->GetCount());
2963+
ctx->log(UTP_LOG_DEBUG, NULL, "rejected incoming connection, too many uTP sockets %tu", std::size(ctx->utp_sockets));
29642964
#endif
29652965

29662966
return 1;

0 commit comments

Comments
 (0)