From fca12fc1ab45c4c215ffd05814a34bb8b9855c8e Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sun, 31 Mar 2019 23:30:05 -0400 Subject: [PATCH] wsd: formatting Change-Id: I07b91c494fe89395ebe1e91506baef46dc03aca8 Reviewed-on: https://gerrit.libreoffice.org/70035 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian Reviewed-on: https://gerrit.libreoffice.org/71092 --- net/WebSocketHandler.hpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp index 30381a7ed..f37d459a2 100644 --- a/net/WebSocketHandler.hpp +++ b/net/WebSocketHandler.hpp @@ -227,7 +227,8 @@ public: if (payloadLen + headerLen > len) { // partial read wait for more data. - LOG_TRC("#" << socket->getFD() << ": Still incomplete WebSocket frame, have " << len << " bytes, frame is " << payloadLen + headerLen << " bytes"); + LOG_TRC("#" << socket->getFD() << ": Still incomplete WebSocket frame, have " << len + << " bytes, frame is " << payloadLen + headerLen << " bytes"); return false; } @@ -238,7 +239,8 @@ public: return true; } - LOG_TRC("#" << socket->getFD() << ": Incoming WebSocket data of " << len << " bytes: " << Util::stringifyHexLine(socket->getInBuffer(), 0, std::min((size_t)32, len))); + LOG_TRC("#" << socket->getFD() << ": Incoming WebSocket data of " << len << " bytes: " + << Util::stringifyHexLine(socket->getInBuffer(), 0, std::min((size_t)32, len))); data = p + headerLen; @@ -693,7 +695,8 @@ protected: { std::shared_ptr socket = _socket.lock(); - LOG_TRC("Incoming client websocket upgrade response: " << std::string(&socket->getInBuffer()[0], socket->getInBuffer().size())); + LOG_TRC("Incoming client websocket upgrade response: " + << std::string(&socket->getInBuffer()[0], socket->getInBuffer().size())); bool bOk = false; StreamSocket::MessageMap map; @@ -715,8 +718,9 @@ protected: map._headerSize = itBody - socket->getInBuffer().begin() + marker.size(); } - if (response.getStatus() == Poco::Net::HTTPResponse::HTTP_SWITCHING_PROTOCOLS && - response.has("Upgrade") && Poco::icompare(response.get("Upgrade"), "websocket") == 0) + if (response.getStatus() == Poco::Net::HTTPResponse::HTTP_SWITCHING_PROTOCOLS + && response.has("Upgrade") + && Poco::icompare(response.get("Upgrade"), "websocket") == 0) { #if 0 // SAL_DEBUG ... const std::string wsKey = response.get("Sec-WebSocket-Accept", "");