loolwsd/DocumentBroker.hpp | 3 +++ loolwsd/LOOLWSD.cpp | 12 +++++++++--- loolwsd/test/UnitAdmin.cpp | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-)
New commits: commit be1e49715c471598eaee53e036b8d6b92948a0d8 Author: Pranav Kant <pran...@collabora.co.uk> Date: Mon Oct 17 18:30:27 2016 +0530 loolwsd: Bring this test back to life There doesn't seem to be any failure on this test anymore. Consecutive 20 runs of this test gives no failure, so lets enable it again. Change-Id: I77ddd1c36d18162bdc75fd24d51c1a2df22f749d diff --git a/loolwsd/test/UnitAdmin.cpp b/loolwsd/test/UnitAdmin.cpp index 6014f76..540318f 100644 --- a/loolwsd/test/UnitAdmin.cpp +++ b/loolwsd/test/UnitAdmin.cpp @@ -422,7 +422,7 @@ public: _tests.push_back(&UnitAdmin::testAddDocNotify); _tests.push_back(&UnitAdmin::testUsersCount); _tests.push_back(&UnitAdmin::testDocCount); - // FIXME make this one reliable, and enable again _tests.push_back(&UnitAdmin::testRmDocNotify); + _tests.push_back(&UnitAdmin::testRmDocNotify); _tests.push_back(&UnitAdmin::testUsersCount); _tests.push_back(&UnitAdmin::testDocCount); #endif commit 38e8a38034325cea62d721481704035c746d8691 Author: Pranav Kant <pran...@collabora.co.uk> Date: Mon Oct 17 17:40:35 2016 +0530 loolwsd: Fix admin remove doc after unloading the session Change-Id: Ia512d5b4c5f0e230542caed6cebc242e3a345430 diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index e591244..0631c6c 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -861,6 +861,9 @@ private: sessionsCount = docBroker->removeSession(id); Log::trace(docKey + ", ws_sessions--: " + std::to_string(sessionsCount)); } + + // Lets remove this session from the admin console too + Admin::instance().rmDoc(docKey, id); } if (sessionsCount == 0) commit d4fbc92023b1a81ad269ab7d87f0fcfba26294f9 Author: Pranav Kant <pran...@collabora.co.uk> Date: Mon Oct 17 17:15:58 2016 +0530 loolwsd: Fix admin console document add Change-Id: I987f26b4aae2c4ea8ef65919f570576ef8c5d2a7 diff --git a/loolwsd/DocumentBroker.hpp b/loolwsd/DocumentBroker.hpp index f9ef407..9472fb9 100644 --- a/loolwsd/DocumentBroker.hpp +++ b/loolwsd/DocumentBroker.hpp @@ -268,6 +268,9 @@ public: void childSocketTerminated(); + /// Get the PID of the associated child process + Poco::Process::PID getPid() const { return _childProcess->getPid(); } + private: /// Sends the .uno:Save command to LoKit. diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index 9538842..e591244 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -809,6 +809,9 @@ private: ws->sendFrame(status.data(), (int) status.size()); } + // Tell the admin console about this new doc + Admin::instance().addDoc(docKey, docBroker->getPid(), docBroker->getFilename(), id); + LOOLWSD::dumpEventTrace(docBroker->getJailId(), id, "NewSession: " + uri); // Let messages flow. commit 1c2c03fcb64042263601365073642e8a726f8045 Author: Pranav Kant <pran...@collabora.co.uk> Date: Mon Oct 17 16:43:47 2016 +0530 loolwsd: Query docbroker for load duration after loading the doc addSession() now also loads the document, so querying docbroker for load duration before it doesn't make any sense. Change-Id: I3c60bef5e2054878ba695b8f76b6800cdedffe8d diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index 95c83b5..9538842 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -796,6 +796,10 @@ private: Util::checkDiskSpaceOnRegisteredFileSystems(); + // Request the child to connect to us and add this session. + auto sessionsCount = docBroker->addSession(session); + Log::trace(docKey + ", ws_sessions++: " + std::to_string(sessionsCount)); + // If its a WOPI host, return time taken to make calls to it const auto storageCallDuration = docBroker->getStorageLoadDuration(); if (storageCallDuration != std::chrono::duration<double>::zero()) @@ -805,10 +809,6 @@ private: ws->sendFrame(status.data(), (int) status.size()); } - // Request the child to connect to us and add this session. - auto sessionsCount = docBroker->addSession(session); - Log::trace(docKey + ", ws_sessions++: " + std::to_string(sessionsCount)); - LOOLWSD::dumpEventTrace(docBroker->getJailId(), id, "NewSession: " + uri); // Let messages flow. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits