[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Thu Feb 9 04:50:36 UTC 2017


 wsd/LOOLWSD.cpp |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 31fc9e1db24d388fb6622d4edef580d72dd351d4
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Wed Feb 8 23:49:18 2017 -0500

    wsd: fix fuzzer build
    
    Change-Id: I121e5e24198e8906af27300752919592283bdb11
    Reviewed-on: https://gerrit.libreoffice.org/34054
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 6a3784a..399a175 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -422,7 +422,11 @@ static void preForkChildren(std::unique_lock<std::mutex>& lock)
 
     // Wait until we have at least one child.
     // With valgrind we need extended time to spawn kits.
+#ifdef KIT_IN_PROCESS
+    const auto timeoutMs = CHILD_TIMEOUT_MS * 3;
+#else
     const auto timeoutMs = CHILD_TIMEOUT_MS * (LOOLWSD::NoCapsForKit ? 150 : 3);
+#endif
     const auto timeout = std::chrono::milliseconds(timeoutMs);
     LOG_TRC("Waiting for a new child for a max of " << timeoutMs << " ms.");
     NewChildrenCV.wait_for(lock, timeout, []() { return !NewChildren.empty(); });
@@ -502,7 +506,11 @@ static std::shared_ptr<ChildProcess> getNewChild()
         }
 
         // With valgrind we need extended time to spawn kits.
+#ifdef KIT_IN_PROCESS
+        const auto timeoutMs = CHILD_TIMEOUT_MS;
+#else
         const auto timeoutMs = CHILD_TIMEOUT_MS * (LOOLWSD::NoCapsForKit ? 100 : 1);
+#endif
         LOG_TRC("Waiting for a new child for a max of " << timeoutMs << " ms.");
         const auto timeout = chrono::milliseconds(timeoutMs);
         if (NewChildrenCV.wait_for(lock, timeout, []() { return !NewChildren.empty(); }))


More information about the Libreoffice-commits mailing list