[Libreoffice-commits] online.git: Branch 'libreoffice-5-3' - 4 commits - common/FileUtil.cpp common/IoUtil.cpp kit/ChildSession.cpp kit/ForKit.cpp test/UnitPrefork.cpp

Jan Holesovsky kendy at collabora.com
Mon Feb 27 22:02:29 UTC 2017


 common/FileUtil.cpp  |    7 +++++++
 common/IoUtil.cpp    |    1 +
 kit/ChildSession.cpp |    7 +++++--
 kit/ForKit.cpp       |    4 ++--
 test/UnitPrefork.cpp |    6 ++----
 5 files changed, 17 insertions(+), 8 deletions(-)

New commits:
commit 17f11cce5d9b2272bc5325ea8d6377a9f4a4f9ca
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Tue Feb 21 19:55:04 2017 +0100

    We should be able to run with 5G of free space just fine.
    
    Change-Id: Ie5df96388eeaa0ddf1a41564ec7d52c283e6b1bb
    (cherry picked from commit 7eff2294d938d0e14db50a385ab9e226c14f7c77)
    Signed-off-by: Andras Timar <andras.timar at collabora.com>

diff --git a/common/FileUtil.cpp b/common/FileUtil.cpp
index ea55548..72afa65 100644
--- a/common/FileUtil.cpp
+++ b/common/FileUtil.cpp
@@ -195,8 +195,15 @@ namespace FileUtil
         if (statfs(path.c_str(), &sfs) == -1)
             return true;
 
+        // we should be able to run just OK with 5GB
+        constexpr int64_t ENOUGH_SPACE = int64_t(5)*1024*1024*1024;
+
+        if (static_cast<int64_t>(sfs.f_bavail) * sfs.f_bsize > ENOUGH_SPACE)
+            return true;
+
         if (static_cast<double>(sfs.f_bavail) / sfs.f_blocks <= 0.05)
             return false;
+
         return true;
     }
 
commit 969382ca85543ad90d2c6eca1d1dd2f7c2cb581b
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Sat Dec 3 23:02:11 2016 +0000

    UnitPrefork: bump timeouts.
    
    (cherry picked from commit a2ff6528bbc1070f8f099efc221ecb1e5dd37ca6)
    Signed-off-by: Andras Timar <andras.timar at collabora.com>

diff --git a/test/UnitPrefork.cpp b/test/UnitPrefork.cpp
index 93d4adb..137ac97 100644
--- a/test/UnitPrefork.cpp
+++ b/test/UnitPrefork.cpp
@@ -49,9 +49,7 @@ public:
           _childDirty(0)
     {
         setHasKitHooks();
-#ifdef TEST_DIRTY_NUMBERS
-        setTimeout(100 * 1000);
-#endif
+        setTimeout(60 * 1000);
     }
 
     virtual void preSpawnCount(int &numPrefork) override
@@ -103,7 +101,7 @@ public:
                 LOG_INF("Getting memory of child #" << i + 1 << " of " << _childSockets.size());
 
                 _childSockets[i]->sendFrame("unit-memdump: \n", sizeof("unit-memdump: \n"));
-                if (_cv.wait_for(lock, std::chrono::milliseconds(5 * 1000)) == std::cv_status::timeout)
+                if (_cv.wait_for(lock, std::chrono::milliseconds(10 * 1000)) == std::cv_status::timeout)
                 {
                     _failure = "Timed out waiting for child to respond to unit-memdump.";
                     std::cerr << _failure << std::endl;
commit 33b6f4a325b6b989458640113012daeeeb58eebc
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Dec 1 12:25:16 2016 +0100

    Don't send setpart: to text documents, it will always jump to the 1st page.
    
    Change-Id: I809f2ba493329174a33f99d63eec2c60b38acb05
    (cherry picked from commit 2b13cfa1a7f4b7b3f472b1e7c36c3a6b9606e134)
    Signed-off-by: Andras Timar <andras.timar at collabora.com>

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 5e364ae..d2b8915 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -109,8 +109,11 @@ bool ChildSession::_handleInput(const char *buffer, int length)
         // Notify all views about updated view info
         _docManager.notifyViewInfo(viewIds);
 
-        sendTextFrame("curpart: part=" + std::to_string(curPart));
-        sendTextFrame("setpart: part=" + std::to_string(curPart));
+        if (getLOKitDocument()->getDocumentType() != LOK_DOCTYPE_TEXT)
+        {
+            sendTextFrame("curpart: part=" + std::to_string(curPart));
+            sendTextFrame("setpart: part=" + std::to_string(curPart));
+        }
 
         //TODO: Is the order of these important?
         for (const auto& pair : _lastDocEvents)
commit e740421fa2012764aa6c220b7c418f419d32cc89
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Mon Nov 28 20:34:18 2016 -0500

    loolwsd: terminate forkit when wsd dies
    
    When we the pipe with wsd is closed we
    assume wsd has died and we terminate too.
    
    WSD can fork us anew, if it's still alive.
    
    Change-Id: I669ed717db973b50498a6bc08e1fca59c6563443
    Reviewed-on: https://gerrit.libreoffice.org/31337
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>
    (cherry picked from commit 7a4250b90e4273f73ab5ab94c35728aeba9f0d63)
    Signed-off-by: Andras Timar <andras.timar at collabora.com>

diff --git a/common/IoUtil.cpp b/common/IoUtil.cpp
index 6ae507c..1250066 100644
--- a/common/IoUtil.cpp
+++ b/common/IoUtil.cpp
@@ -322,6 +322,7 @@ int PipeReader::readLine(std::string& line,
         }
         else if (pipe.revents & (POLLERR | POLLHUP | POLLNVAL))
         {
+            LOG_FTL("Pipe closed.");
             return -1;
         }
     }
diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp
index 4680c4d..b727817 100644
--- a/kit/ForKit.cpp
+++ b/kit/ForKit.cpp
@@ -75,9 +75,9 @@ public:
         if (ready <= 0)
         {
             // Termination is done via SIGTERM, which breaks the wait.
-            if (TerminationFlag)
+            if (ready < 0)
             {
-                if (ready < 0)
+                if (TerminationFlag)
                 {
                     LOG_INF("Poll interrupted in " << getName() << " and Termination flag set.");
                 }


More information about the Libreoffice-commits mailing list