diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-01-31 17:59:10 +0300 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-02-09 19:16:40 +0300 |
commit | c88ff01faaf3dbc93564a15e930bb533a56516d1 (patch) | |
tree | 6172c63a181460fbcd40a7fbea97f3ed8f41bd39 /library/cpp/netliba/v6/udp_client_server.cpp | |
parent | 22faf7825187091e0ac85a196aab658c151f83be (diff) | |
download | ydb-c88ff01faaf3dbc93564a15e930bb533a56516d1.tar.gz |
Intermediate changes
Diffstat (limited to 'library/cpp/netliba/v6/udp_client_server.cpp')
-rw-r--r-- | library/cpp/netliba/v6/udp_client_server.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/cpp/netliba/v6/udp_client_server.cpp b/library/cpp/netliba/v6/udp_client_server.cpp index e7cde45242..14f60625f2 100644 --- a/library/cpp/netliba/v6/udp_client_server.cpp +++ b/library/cpp/netliba/v6/udp_client_server.cpp @@ -1214,7 +1214,7 @@ namespace NNetliba { const TUdpAddress& ip = i.first; const TCongestionControl& cc = *i.second.UdpCongestion; IIBPeer* ibPeer = i.second.IBPeer.Get(); - sprintf(buf, "%s\tIB: %d, RTT: %g Timeout: %g Window: %g MaxWin: %g FailRate: %g TimeSinceLastRecv: %g Transfers: %d MTU: %d\n", + snprintf(buf, sizeof(buf), "%s\tIB: %d, RTT: %g Timeout: %g Window: %g MaxWin: %g FailRate: %g TimeSinceLastRecv: %g Transfers: %d MTU: %d\n", GetAddressAsString(ip).c_str(), ibPeer ? ibPeer->GetState() : -1, cc.GetRTT() * 1000, cc.GetTimeout() * 1000, cc.GetWindow(), cc.GetMaxWindow(), cc.GetFailRate(), @@ -1227,17 +1227,17 @@ namespace NNetliba { TString TUdpHost::GetDebugInfo() { TString res; char buf[1000]; - sprintf(buf, "Receiving %d msgs, sending %d high prior, %d regular msgs, %d low prior msgs\n", + snprintf(buf, sizeof(buf), "Receiving %d msgs, sending %d high prior, %d regular msgs, %d low prior msgs\n", RecvQueue.ysize(), (int)SendOrderHighPrior.size(), (int)SendOrder.size(), (int)SendOrderLow.size()); res += buf; TRequesterPendingDataStats pds; GetPendingDataSize(&pds); - sprintf(buf, "Pending data size: %" PRIu64 "\n", pds.InpDataSize + pds.OutDataSize); + snprintf(buf, sizeof(buf), "Pending data size: %" PRIu64 "\n", pds.InpDataSize + pds.OutDataSize); res += buf; - sprintf(buf, " in packets: %d, size %" PRIu64 "\n", pds.InpCount, pds.InpDataSize); + snprintf(buf, sizeof(buf), " in packets: %d, size %" PRIu64 "\n", pds.InpCount, pds.InpDataSize); res += buf; - sprintf(buf, " out packets: %d, size %" PRIu64 "\n", pds.OutCount, pds.OutDataSize); + snprintf(buf, sizeof(buf), " out packets: %d, size %" PRIu64 "\n", pds.OutCount, pds.OutDataSize); res += buf; res += "\nCongestion info:\n"; |