[Libreoffice-commits] online.git: loolwsd/DocumentBroker.cpp loolwsd/MasterProcessSession.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Sat Mar 26 17:07:35 UTC 2016
loolwsd/DocumentBroker.cpp | 10 ++++++++--
loolwsd/MasterProcessSession.cpp | 6 +-----
2 files changed, 9 insertions(+), 7 deletions(-)
New commits:
commit 87e7dddec02dce9238ca3f1f15c058f98eb27950
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sat Mar 26 09:10:53 2016 -0400
loolwsd: tile persisting done on successful save only
Change-Id: I1399556e809e1ee0ba194d04e93a81f786084029
Reviewed-on: https://gerrit.libreoffice.org/23537
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index 82dc71f..7ee2d50 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -118,8 +118,14 @@ bool DocumentBroker::save()
{
Log::debug("Saving to URI: " + _uriPublic.toString());
- assert(_storage);
- return _storage->saveLocalFileToStorage();
+ assert(_storage && _tileCache);
+ if (_storage->saveLocalFileToStorage())
+ {
+ _tileCache->documentSaved();
+ return true;
+ }
+
+ return false;
}
std::string DocumentBroker::getJailRoot() const
diff --git a/loolwsd/MasterProcessSession.cpp b/loolwsd/MasterProcessSession.cpp
index 324504c..62e4d6f 100644
--- a/loolwsd/MasterProcessSession.cpp
+++ b/loolwsd/MasterProcessSession.cpp
@@ -387,11 +387,7 @@ bool MasterProcessSession::_handleInput(const char *buffer, int length)
forwardToPeer(buffer, length);
}
- if ((tokens.count() > 1 && tokens[0] == "uno" && tokens[1] == ".uno:Save"))
- {
- _docBroker->tileCache().documentSaved();
- }
- else if (tokens[0] == "disconnect")
+ if (tokens[0] == "disconnect")
{
// This was the last we would hear from the client on this socket.
return handleDisconnect(tokens);
More information about the Libreoffice-commits
mailing list