[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-9' - 7 commits - loolwsd/DocumentBroker.cpp loolwsd/DocumentBroker.hpp loolwsd/LOOLWSD.cpp loolwsd/loolwsd.spec.in loolwsd/MessageQueue.cpp
Michael Meeks
michael.meeks at collabora.com
Wed Nov 2 06:42:46 UTC 2016
loolwsd/DocumentBroker.cpp | 4 +++-
loolwsd/DocumentBroker.hpp | 2 +-
loolwsd/LOOLWSD.cpp | 7 ++++---
loolwsd/MessageQueue.cpp | 3 +++
loolwsd/loolwsd.spec.in | 1 +
5 files changed, 12 insertions(+), 5 deletions(-)
New commits:
commit 5704f956f924f75458211ef711058f539abdedc5
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed Nov 2 01:23:00 2016 +0000
loolwsd: remove assertion that sessions are cleaned up nicely.
(cherry picked from commit e48f9d7557a2e4153df039706516a751a4a55d8b)
diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index 728f5fb..5f417f1 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -171,7 +171,7 @@ DocumentBroker::~DocumentBroker()
<< "] destroyed with " << _sessions.size()
<< " sessions left." << Log::end;
- assert(_sessions.empty());
+// assert(_sessions.empty());
}
bool DocumentBroker::load(const std::string& sessionId, const std::string& jailId)
commit d1f7a6353fde80094831634e5112ee0dec86909e
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed Nov 2 00:46:17 2016 +0000
loolwsd: avoid ordering issues with atexit handlers.
Otherwise Admin::instance() has been destroyed by the time we're
cleaning up the DocumentBrokers resulting in FMRs etc.
(cherry picked from commit 5e9b582ed4d74a9d343f96cc0899aba452f31654)
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 1907cf3..2a74663 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -2088,6 +2088,9 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
Poco::Crypto::uninitializeCrypto();
}
+ // atexit handlers tend to free Admin before Documents
+ Log::info("Cleaning up lingering documents.");
+ DocBrokers.clear();
Log::info("Process [loolwsd] finished.");
commit e6062bde0ed24684dc377a21234f61bdc17d92a3
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed Nov 2 00:42:56 2016 +0000
loolwsd: Better fix for 'Address already in use' vs. 86383d40db
(cherry picked from commit da76cffc0df9f7ec8bc3df05e0c49e9f2bc8d647)
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 1eb68e3..1907cf3 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1320,9 +1320,7 @@ static inline ServerSocket* getServerSocket(int nClientPortNumber)
ServerSocket* socket = LOOLWSD::isSSLEnabled() ? new SecureServerSocket() : new ServerSocket();
Poco::Net::IPAddress wildcardAddr;
SocketAddress address(wildcardAddr, nClientPortNumber);
- socket->init(address.af());
- socket->setReuseAddress(true);
- socket->bind(address, false);
+ socket->bind(address, true);
// 64 is the default value for the backlog parameter in Poco
// when creating a ServerSocket, so use it here, too.
socket->listen(64);
commit 480eb3cf64f9c0399ca664efd10575b7e75c1658
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Nov 1 23:38:25 2016 +0000
DocumentBroker - hold mutex while iterating over _sessions.
(cherry picked from commit 2b9ae4b263c90f814c608e79c92cdb599d440a98)
diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index eda6eeb..728f5fb 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -887,6 +887,8 @@ bool DocumentBroker::forwardToClient(const std::string& prefix, const std::vecto
void DocumentBroker::childSocketTerminated()
{
+ std::lock_guard<std::mutex> lock(_mutex);
+
if (!_childProcess->isAlive())
{
Log::error("Child for doc [" + _docKey + "] terminated prematurely.");
commit 83083dbe496d821a17c95a38648b2a1481684232
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Nov 1 22:40:11 2016 +0000
Slide thumbnailing / canceltiles fix.
Avoid canceltiles on in-flight message queue in loolkit potentially
overlooked in 97adaf935b3
(cherry picked from commit 4b0ebe49488b44eb6b4d6997dad70f0ccf0c471e)
diff --git a/loolwsd/MessageQueue.cpp b/loolwsd/MessageQueue.cpp
index 3729018..9a34187 100644
--- a/loolwsd/MessageQueue.cpp
+++ b/loolwsd/MessageQueue.cpp
@@ -102,6 +102,9 @@ void TileQueue::put_impl(const Payload& value)
[&tokens](const Payload& v)
{
const std::string s(v.data(), v.size());
+ // Tile is for a thumbnail, don't cancel it
+ if (s.find("id=") != std::string::npos)
+ return false;
for (size_t i = 0; i < tokens.count(); ++i)
{
if (s.find("ver=" + tokens[i]) != std::string::npos)
commit bf6ed4e1a01a5d5cfae9b02f42f444762a59582a
Author: László Németh <laszlo.nemeth at collabora.com>
Date: Fri Oct 28 17:32:07 2016 +0000
loolwsd: set debuginfo packaging
(cherry picked from commit f7f55dede58f8ed03e57e1f5605066a24ea05e1c)
diff --git a/loolwsd/loolwsd.spec.in b/loolwsd/loolwsd.spec.in
index 8e5a3d6..9035933 100644
--- a/loolwsd/loolwsd.spec.in
+++ b/loolwsd/loolwsd.spec.in
@@ -55,6 +55,7 @@ Obsoletes: loleaflet <= 1.5.8
%description
+%debug_package
%prep
%setup -n loolwsd- at PACKAGE_VERSION@
%setup -n loolwsd- at PACKAGE_VERSION@ -T -D -a 1
commit 14ca25aa7abc1e989c6683079a75d3a6f4c61012
Author: Andras Timar <andras.timar at collabora.com>
Date: Tue Nov 1 22:35:18 2016 +0100
typo fix
(cherry picked from commit ac86cdf764191d20aae56702e4029af90e4ba822)
diff --git a/loolwsd/DocumentBroker.hpp b/loolwsd/DocumentBroker.hpp
index f538fc3..c1d0936 100644
--- a/loolwsd/DocumentBroker.hpp
+++ b/loolwsd/DocumentBroker.hpp
@@ -97,7 +97,7 @@ public:
}
catch (const std::exception& ex)
{
- Log::error("Eror while closing child process: " + std::string(ex.what()));
+ Log::error("Error while closing child process: " + std::string(ex.what()));
}
}
More information about the Libreoffice-commits
mailing list