loolwsd/LOOLWSD.cpp | 9 ++++----- loolwsd/test/httpposttest.cpp | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)
New commits: commit 36a3810541f82d1f9bf001c6e50bf63c40b787a1 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Mon Apr 4 22:50:57 2016 -0400 loolwsd: fixed convert-to and re-enabled test Change-Id: I91ad9ac7dbe394d4a560081379e35442f1469eb8 Reviewed-on: https://gerrit.libreoffice.org/23825 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index 6b05fca..93e65ee 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -291,17 +291,16 @@ private: // In that case, we can use a pool and index by publicPath. std::unique_lock<std::mutex> lock(docBrokersMutex); + //FIXME: What if the same document is already open? Need a fake dockey here. Log::debug("New DocumentBroker for docKey [" + docKey + "]."); docBrokers.emplace(docKey, docBroker); - // Request a kit process for this doc. - const std::string aMessage = "request " + id + " " + docKey + "\n"; - Log::debug("MasterToBroker: " + aMessage.substr(0, aMessage.length() - 1)); - IoUtil::writeFIFO(LOOLWSD::BrokerWritePipe, aMessage); - // Load the document. std::shared_ptr<WebSocket> ws; auto session = std::make_shared<MasterProcessSession>(id, LOOLSession::Kind::ToClient, ws, docBroker, nullptr); + docBroker->addWSSession(id, session); + unsigned wsSessionsCount = docBroker->getWSSessionsCount(); + Log::warn(docKey + ", ws_sessions++: " + std::to_string(wsSessionsCount)); session->setEditLock(true); docBroker->incSessions(); lock.unlock(); diff --git a/loolwsd/test/httpposttest.cpp b/loolwsd/test/httpposttest.cpp index a4b0b03..2a39f58 100644 --- a/loolwsd/test/httpposttest.cpp +++ b/loolwsd/test/httpposttest.cpp @@ -28,7 +28,7 @@ class HTTPPostTest : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE(HTTPPostTest); - //CPPUNIT_TEST(testConvertTo); + CPPUNIT_TEST(testConvertTo); CPPUNIT_TEST_SUITE_END(); void testConvertTo(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits