common/Session.cpp | 1 + wsd/ClientSession.cpp | 2 +- wsd/DocumentBroker.cpp | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-)
New commits: commit 33107d32bc9b8f5c91fd5af0bfbb28b2c34f8a8e Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Mon May 25 09:57:29 2020 +0100 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Mon May 25 21:52:09 2020 +0200 IO stats - handle convert-to case, and initiailize all temporaries. Change-Id: I16c60c89745a7cc2f369a010c77cffbb08759f7b Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94775 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Michael Meeks <michael.me...@collabora.com> (cherry picked from commit 87d039e00aed9ddc132f3984d3cb4000360c2c85) Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94686 Reviewed-by: Aron Budea <aron.bu...@collabora.com> diff --git a/common/Session.cpp b/common/Session.cpp index ef8deea25..58d7c0b6b 100644 --- a/common/Session.cpp +++ b/common/Session.cpp @@ -264,6 +264,7 @@ void Session::getIOStats(uint64_t &sent, uint64_t &recv) if (!_protocol) { LOG_TRC("ERR - missing protocol " << getName() << ": Get IO stats."); + sent = 0; recv = 0; return; } diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp index e985b2a7a..f393eaf5b 100644 --- a/wsd/ClientSession.cpp +++ b/wsd/ClientSession.cpp @@ -1722,7 +1722,7 @@ void ClientSession::dumpState(std::ostream& os) if (_protocol) { - uint64_t sent, recv; + uint64_t sent = 0, recv = 0; _protocol->getIOStats(sent, recv); os << "\n\t\tsent/keystroke: " << (double)sent/_keyEvents << "bytes"; } diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index a81864506..579544165 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -357,7 +357,7 @@ void DocumentBroker::pollThread() (now - lastBWUpdateTime).count() >= COMMAND_TIMEOUT_MS) { lastBWUpdateTime = now; - uint64_t sent, recv; + uint64_t sent = 0, recv = 0; getIOStats(sent, recv); uint64_t deltaSent = 0, deltaRecv = 0; @@ -2232,7 +2232,7 @@ void DocumentBroker::getIOStats(uint64_t &sent, uint64_t &recv) assertCorrectThread(); for (const auto& sessionIt : _sessions) { - uint64_t s, r; + uint64_t s = 0, r = 0; sessionIt.second->getIOStats(s, r); sent += s; recv += r; @@ -2377,7 +2377,7 @@ void DocumentBroker::dumpState(std::ostream& os) { std::unique_lock<std::mutex> lock(_mutex); - uint64_t sent, recv; + uint64_t sent = 0, recv = 0; getIOStats(sent, recv); auto now = std::chrono::steady_clock::now(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits