[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - loolwsd/LOOLWSD.cpp loolwsd/MasterProcessSession.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Sun May 29 16:10:49 UTC 2016
loolwsd/LOOLWSD.cpp | 1 -
loolwsd/MasterProcessSession.cpp | 12 +++++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 0c6887c744fcd811728de43a971ee9c964d86e8e
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun May 29 12:00:09 2016 -0400
loolwsd: bccu#1687 - leaking loolkit processes
When conversion fails we still have to put
something in the save-as queue to avoid
hanging WSD forever.
Change-Id: Ibc518bc922ee40f579a71e07571b21d9e633d998
Reviewed-on: https://gerrit.libreoffice.org/25618
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index db561d0..404f576 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -389,7 +389,6 @@ private:
Log::trace(docKey + ", ws_sessions++: " + std::to_string(sessionsCount));
lock.unlock();
- Log::trace(docKey + ", ws_sessions++: " + std::to_string(sessionsCount));
// Wait until the client has connected with a prison socket.
waitBridgeCompleted(session);
diff --git a/loolwsd/MasterProcessSession.cpp b/loolwsd/MasterProcessSession.cpp
index c62ef32..31aa772 100644
--- a/loolwsd/MasterProcessSession.cpp
+++ b/loolwsd/MasterProcessSession.cpp
@@ -157,8 +157,18 @@ bool MasterProcessSession::_handleInput(const char *buffer, int length)
{
// Rewrite file:// URLs, as they are visible to the outside world.
const Path path(_docBroker->getJailRoot(), url.substr(filePrefix.length()));
- url = filePrefix + path.toString().substr(1);
+ if (Poco::File(path).exists())
+ {
+ url = filePrefix + path.toString().substr(1);
+ }
+ else
+ {
+ // Blank for failure.
+ Log::debug("SaveAs produced no output, producing blank url.");
+ url.clear();
+ }
}
+
peer->_saveAsQueue.put(url);
}
More information about the Libreoffice-commits
mailing list