wsd/DocumentBroker.cpp |    4 ++--
 wsd/DocumentBroker.hpp |    5 -----
 2 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit 7da1909d3c7596f6801391f7286efeadd114c44b
Author: Ashod Nakashian <ashod.nakash...@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 <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@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.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to