loolwsd/DocumentBroker.cpp |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

New commits:
commit b0f20ea35f604494df28ad6b2e2b377b60185f52
Author: Ashod Nakashian <ashod.nakash...@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 <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@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;
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to