[Libreoffice-commits] online.git: loolwsd/Common.hpp loolwsd/LOOLKit.cpp loolwsd/LOOLWSD.cpp loolwsd/LOOLWSD.hpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Wed Jan 6 21:56:45 PST 2016


 loolwsd/Common.hpp  |    2 +-
 loolwsd/LOOLKit.cpp |    2 +-
 loolwsd/LOOLWSD.cpp |    3 ++-
 loolwsd/LOOLWSD.hpp |    1 +
 4 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 7f9485e318491fb315755c181eed21f0bc5f8672
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Wed Jan 6 23:37:18 2016 -0500

    loolwsd: jailId now static member
    
    Change-Id: I7142038d421d642a3e9dfd3e1069c7401ec7db5c
    Reviewed-on: https://gerrit.libreoffice.org/21183
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/Common.hpp b/loolwsd/Common.hpp
index 04fb0d1..e90b446 100644
--- a/loolwsd/Common.hpp
+++ b/loolwsd/Common.hpp
@@ -22,7 +22,7 @@ constexpr int POLL_TIMEOUT = 1000000;
 // work loads.
 constexpr int PIPE_BUFFER = 1024;
 
-static const std::string JailedDocumentRoot = "/user/doc/";
+static const std::string JailedDocumentRoot = "/user/docs/";
 
 // Flag to stop pump loops.
 static volatile bool TerminationFlag = false;
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 3f67652..e309118 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -647,7 +647,7 @@ void lokit_main(const std::string &loSubPath, const std::string& jailId, const s
         CallBackWorker callbackWorker(ChildProcessSession::_callbackQueue);
         Poco::ThreadPool::defaultPool().start(callbackWorker);
 
-        Log::info("Child [" + jailId + "] is ready.");
+        Log::info("loolkit [" + std::to_string(Process::id()) + "] is ready.");
 
         std::string aResponse;
         std::string aMessage;
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 09b5a06..7117cb3 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -640,6 +640,7 @@ std::string LOOLWSD::cache = LOOLWSD_CACHEDIR;
 std::string LOOLWSD::sysTemplate;
 std::string LOOLWSD::loTemplate;
 std::string LOOLWSD::childRoot;
+std::string LOOLWSD::jailId;
 std::string LOOLWSD::loSubPath = "lo";
 Poco::NamedMutex LOOLWSD::NamedMutexLOOL("loolwsd");
 
@@ -870,7 +871,7 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
 
     NamedMutexLOOL.lock();
 
-    const auto jailId = Util::createRandomDir(childRoot);
+    jailId = Util::createRandomDir(childRoot);
     if (!createBroker(jailId))
     {
         Log::error("Failed to spawn loolBroker.");
diff --git a/loolwsd/LOOLWSD.hpp b/loolwsd/LOOLWSD.hpp
index 653659d..f8e8f63 100644
--- a/loolwsd/LOOLWSD.hpp
+++ b/loolwsd/LOOLWSD.hpp
@@ -41,6 +41,7 @@ public:
     static std::string sysTemplate;
     static std::string loTemplate;
     static std::string childRoot;
+    static std::string jailId;
     static std::string loSubPath;
     static Poco::NamedMutex NamedMutexLOOL;
 


More information about the Libreoffice-commits mailing list