[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp

Pranav Kant pranavk at collabora.co.uk
Fri Jul 28 16:17:08 UTC 2017


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

New commits:
commit ce2608b374bdbd4f61079f989705b5ca9dc8b16a
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Wed Jun 21 15:37:38 2017 +0530

    Bin unused parameter, rude
    
    Change-Id: I39f55f55f8a0c5432350625d9720ea2367955a8c
    Reviewed-on: https://gerrit.libreoffice.org/39085
    Reviewed-by: pranavk <pranavk at collabora.co.uk>
    Tested-by: pranavk <pranavk at collabora.co.uk>
    (cherry picked from commit c21de445247813c27f66c62a9bf6af03a11386ec)
    Reviewed-on: https://gerrit.libreoffice.org/39766
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 5407caed..18f5bc71 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -284,7 +284,7 @@ void DocumentBroker::pollThread()
     }
 
     // Terminate properly while we can.
-    terminateChild(closeReason, false);
+    terminateChild(closeReason);
 
     // Stop to mark it done and cleanup.
     _poll->stop();
@@ -1392,17 +1392,14 @@ void DocumentBroker::childSocketTerminated()
     shutdownClients("terminated");
 }
 
-void DocumentBroker::terminateChild(const std::string& closeReason, const bool rude)
+void DocumentBroker::terminateChild(const std::string& closeReason)
 {
     assertCorrectThread();
 
     LOG_INF("Terminating doc [" << _docKey << "] with reason: " << closeReason);
 
     // Close all running sessions
-    if (!rude)
-    {
-        shutdownClients(closeReason);
-    }
+    shutdownClients(closeReason);
 
     if (_childProcess)
     {
@@ -1410,12 +1407,8 @@ void DocumentBroker::terminateChild(const std::string& closeReason, const bool r
 
         // First flag to stop as it might be waiting on our lock
         // to process some incoming message.
-        if (!rude)
-        {
-            _childProcess->stop();
-        }
-
-        _childProcess->close(rude);
+        _childProcess->stop();
+        _childProcess->close(false);
     }
 
     _stop = true;
@@ -1426,7 +1419,7 @@ void DocumentBroker::closeDocument(const std::string& reason)
     assertCorrectThread();
 
     LOG_DBG("Closing DocumentBroker for docKey [" << _docKey << "] with reason: " << reason);
-    terminateChild(reason, false);
+    terminateChild(reason);
 }
 
 void DocumentBroker::broadcastMessage(const std::string& message)
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 1329fcb1..27878c69 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -349,7 +349,7 @@ private:
 
     /// This gracefully terminates the connection
     /// with the child and cleans up ChildProcess etc.
-    void terminateChild(const std::string& closeReason, const bool rude);
+    void terminateChild(const std::string& closeReason);
 
     /// Saves the doc to the storage.
     bool saveToStorageInternal(const std::string& sesionId, bool success, const std::string& result = "");


More information about the Libreoffice-commits mailing list