[Libreoffice-commits] online.git: 2 commits - loolwsd/DocumentBroker.cpp loolwsd/LOOLWSD.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Oct 31 06:07:15 UTC 2016


 loolwsd/DocumentBroker.cpp |    2 ++
 loolwsd/LOOLWSD.cpp        |    8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit c96c13f01432cc9d2586021fd0f96e446e6fa3f1
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun Oct 30 14:31:34 2016 -0400

    loolwsd: expect no sessions when destroying DocumentBroker
    
    Change-Id: Ib8244cd8ae6449a07eb010fba4b26ec5bad09162
    Reviewed-on: https://gerrit.libreoffice.org/30418
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index 10aef26..185d610 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -170,6 +170,8 @@ DocumentBroker::~DocumentBroker()
     Log::info() << "~DocumentBroker [" << _uriPublic.toString()
                 << "] destroyed with " << _sessions.size()
                 << " sessions left." << Log::end;
+
+    assert(_sessions.empty() && "DocumentBroker still has unremoved sessions!");
 }
 
 bool DocumentBroker::load(const std::string& sessionId, const std::string& jailId)
commit ce785b643213406ed802ef630fb9ef75d01dfa59
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sat Oct 29 21:32:56 2016 -0400

    loolwsd: convert int to string before adding to literal
    
    Change-Id: Ia3352589aa894b38892f98fedc93926f063dce72
    Reviewed-on: https://gerrit.libreoffice.org/30417
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 26a726e..119e7b3 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1335,14 +1335,14 @@ static inline ServerSocket* getServerSocket(int nClientPortNumber)
 
 static inline ServerSocket* findFreeServerPort(int& nClientPortNumber)
 {
-    ServerSocket *socket = NULL;
+    ServerSocket* socket = nullptr;
     while (!socket)
     {
         socket = getServerSocket(nClientPortNumber);
         if (!socket)
         {
             nClientPortNumber++;
-            Log::info("client port busy - trying " + nClientPortNumber);
+            Log::info("client port busy - trying " + std::to_string(nClientPortNumber));
         }
     }
     return socket;
@@ -1365,14 +1365,14 @@ static inline ServerSocket* getMasterSocket(int nMasterPortNumber)
 static inline
 ServerSocket* findFreeMasterPort(int &nMasterPortNumber)
 {
-    ServerSocket *socket = NULL;
+    ServerSocket* socket = nullptr;
     while (!socket)
     {
         socket = getServerSocket(nMasterPortNumber);
         if (!socket)
         {
             nMasterPortNumber++;
-            Log::info("master port busy - trying " + nMasterPortNumber);
+            Log::info("master port busy - trying " + std::to_string(nMasterPortNumber));
         }
     }
     return socket;


More information about the Libreoffice-commits mailing list