[Libreoffice-commits] online.git: loolwsd/LOOLProtocol.hpp loolwsd/LOOLWebSocket.hpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Nov 14 05:19:06 UTC 2016


 loolwsd/LOOLProtocol.hpp  |    6 +++---
 loolwsd/LOOLWebSocket.hpp |    6 +-----
 2 files changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 5d69d0abd608a447df0355152643608d8034b7a2
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sat Nov 12 10:40:37 2016 -0500

    loolwsd: log only abbreviated messages
    
    Change-Id: I3328a9171f8b85a802dc888de009bdbb8658cead
    Reviewed-on: https://gerrit.libreoffice.org/30815
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/LOOLProtocol.hpp b/loolwsd/LOOLProtocol.hpp
index 2c158ff..e95090d 100644
--- a/loolwsd/LOOLProtocol.hpp
+++ b/loolwsd/LOOLProtocol.hpp
@@ -18,7 +18,7 @@
 #include <Poco/Format.h>
 #include <Poco/StringTokenizer.h>
 
-#include <LOOLWebSocket.hpp>
+#include <Poco/Net/WebSocket.h>
 
 #define LOK_USE_UNSTABLE_API
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
@@ -190,8 +190,8 @@ namespace LOOLProtocol
         return getAbbreviatedMessage(message.data(), message.size());
     }
 
-    // Return a string dump of a LOOLWebSocket frame: Its opcode, length, first line (if present),
-    // flags.  For human-readable logging purposes. Format not guaranteed to be stable. Not to be
+    // Return a string dump of a WebSocket frame: Its opcode, length, first line (if present),
+    // flags. For human-readable logging purposes. Format not guaranteed to be stable. Not to be
     // inspected programmatically.
     inline
     std::string getAbbreviatedFrameDump(const char *message, const int length, const int flags)
diff --git a/loolwsd/LOOLWebSocket.hpp b/loolwsd/LOOLWebSocket.hpp
index ffd4887..a8599f2 100644
--- a/loolwsd/LOOLWebSocket.hpp
+++ b/loolwsd/LOOLWebSocket.hpp
@@ -71,11 +71,7 @@ public:
         }
 
         int result = Poco::Net::WebSocket::sendFrame(buffer, length, flags);
-        // FIXME we want an abbreviated message here, but we'd have a circular
-        // dependency with LOOLProtocol, so use the full message here before
-        // we move getAbbreviatedMessage() to Log (where it belongs anyway).
-        //Log::debug("Sent frame: " + LOOLProtocol::getAbbreviatedMessage(static_cast<const char*>(buffer), length));
-        Log::debug("Sent frame: " + std::string(static_cast<const char*>(buffer), length));
+        Log::debug("Sent frame: " + LOOLProtocol::getAbbreviatedMessage(static_cast<const char*>(buffer), length));
 
         return result;
     }


More information about the Libreoffice-commits mailing list