[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Thu Apr 6 17:55:43 UTC 2017
wsd/DocumentBroker.cpp | 4 ++--
wsd/DocumentBroker.hpp | 5 -----
2 files changed, 2 insertions(+), 7 deletions(-)
New commits:
commit 7da1909d3c7596f6801391f7286efeadd114c44b
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Thu Apr 6 13:49:22 2017 -0400
wsd: kill DocumentBroker::getSessionsCount
Change-Id: Icd3229fe9b7d2f17a0e8a8f955c41ead8bca98c7
Reviewed-on: https://gerrit.libreoffice.org/36226
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 0ee99738..9550dfd2 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -247,7 +247,7 @@ void DocumentBroker::pollThread()
// Cleanup used and dead entries.
if ((isLoaded() || _markToDestroy) &&
- (getSessionsCount() == 0 || !isAlive() || idle))
+ (_sessions.empty() || !isAlive() || idle))
{
LOG_INF("Terminating " << (idle ? "idle" : "dead") <<
" DocumentBroker for docKey [" << getDocKey() << "].");
@@ -1369,7 +1369,7 @@ void DocumentBroker::dumpState(std::ostream& os)
os << "\n jailed uri: " << _uriJailed.toString();
os << "\n doc key: " << _docKey;
os << "\n doc id: " << _docId;
- os << "\n num sessions: " << getSessionsCount();
+ os << "\n num sessions: " << _sessions.size();
os << "\n last editable?: " << _lastEditableSession;
std::time_t t = std::chrono::system_clock::to_time_t(
std::chrono::system_clock::now()
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index fd8d20e8..c8758ba9 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -251,11 +251,6 @@ public:
const std::string& getFilename() const { return _filename; };
TileCache& tileCache() { return *_tileCache; }
bool isAlive() const;
- size_t getSessionsCount() const
- {
- Util::assertIsLocked(_mutex);
- return _sessions.size();
- }
/// Are we running in either shutdown, or the polling thread.
/// Asserts in the debug builds, otherwise just logs.
More information about the Libreoffice-commits
mailing list