[Libreoffice-commits] online.git: loolwsd/DocumentBroker.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Tue Sep 20 03:19:01 UTC 2016
loolwsd/DocumentBroker.cpp | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
New commits:
commit b0f20ea35f604494df28ad6b2e2b377b60185f52
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Mon Sep 19 19:18:07 2016 -0400
loolwsd: proper tracing of outgoing tile messages
Change-Id: I875743cac144bd4bc357038aa58c9cfe7a3988aa
Reviewed-on: https://gerrit.libreoffice.org/29059
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 182a72c..cd4639f 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -472,19 +472,24 @@ size_t DocumentBroker::removeSession(const std::string& id)
bool DocumentBroker::handleInput(const std::vector<char>& payload)
{
- Log::trace("DocumentBroker got child message: [" + LOOLProtocol::getAbbreviatedMessage(payload) + "].");
+ const auto msg = LOOLProtocol::getAbbreviatedMessage(payload);
+ Log::trace("DocumentBroker got child message: [" + msg + "].");
- const auto command = LOOLProtocol::getFirstToken(payload);
- LOOLWSD::dumpOutgoingTrace(getJailId(), "0", command);
+ LOOLWSD::dumpOutgoingTrace(getJailId(), "0", msg);
- if (command == "tile:")
+ if (msg.find("tile:") == 0)
{
handleTileResponse(payload);
}
- else if (command == "tilecombine:")
+ else if (msg.find("tilecombine:") == 0)
{
handleTileCombinedResponse(payload);
}
+ else
+ {
+ Log::error("Unexpected message: [" + msg + "].");
+ return false;
+ }
return true;
}
More information about the Libreoffice-commits
mailing list