loolwsd/ChildProcessSession.cpp | 1 + loolwsd/MasterProcessSession.cpp | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit e2cf1a5b52f261394f7989122e79356a69128de9 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Thu Apr 28 07:31:55 2016 -0400 loolwsd: always send status before other messages Except for loading progress messages (statusindicator). Change-Id: I42f79167c3ff953fc4e283854468cd7e8bd54bc3 Reviewed-on: https://gerrit.libreoffice.org/24474 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/ChildProcessSession.cpp b/loolwsd/ChildProcessSession.cpp index cc7b603..f159ca8 100644 --- a/loolwsd/ChildProcessSession.cpp +++ b/loolwsd/ChildProcessSession.cpp @@ -587,6 +587,7 @@ bool ChildProcessSession::loadDocument(const char * /*buffer*/, int /*length*/, } // Respond by the document status, which has no arguments. + Log::debug("Sending status after load."); if (!getStatus(nullptr, 0)) return false; diff --git a/loolwsd/MasterProcessSession.cpp b/loolwsd/MasterProcessSession.cpp index f8e321f..c1fa22d 100644 --- a/loolwsd/MasterProcessSession.cpp +++ b/loolwsd/MasterProcessSession.cpp @@ -202,7 +202,10 @@ bool MasterProcessSession::_handleInput(const char *buffer, int length) { _docBroker->tileCache().saveTextFile(std::string(buffer, length), "status.txt"); - // let clients know if they hold the edit lock + // Forward the status response to the client. + forwardToPeer(buffer, length); + + // And let clients know if they hold the edit lock. std::string message = "editlock: "; message += std::to_string(peer->isEditLocked()); Log::debug("Forwarding [" + message + "] in response to status."); @@ -397,13 +400,9 @@ bool MasterProcessSession::loadDocument(const char* /*buffer*/, int /*length*/, bool MasterProcessSession::getStatus(const char *buffer, int length) { const std::string status = _docBroker->tileCache().getTextFile("status.txt"); - if (status.size() > 0) + if (!status.empty()) { sendTextFrame(status); - // let clients know if they hold the edit lock - std::string message = "editlock: "; - message += std::to_string(isEditLocked()); - sendTextFrame(message); return true; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits