loleaflet/src/core/Socket.js | 2 +- loolwsd/LOOLWSD.cpp | 5 ++--- loolwsd/protocol.txt | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-)
New commits: commit e63905116affb7012d65ff4fad4d3d696e263f18 Author: Jan Holesovsky <ke...@collabora.com> Date: Tue Mar 15 11:04:17 2016 +0100 loolwsd, loleaflet: Rename 'connectionclose' to 'disconnect'. diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 110b98e..be3aa71 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -21,7 +21,7 @@ L.Socket = L.Class.extend({ close: function () { // mark this as a deliberate shutdown - this.sendMessage('closeconnection'); + this.sendMessage('disconnect'); this.socket.onerror = function () {}; this.socket.onclose = function () {}; diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index ff3ddbc..74fb7be 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -437,10 +437,9 @@ public: std::string firstLine = getFirstLine(buffer, n); StringTokenizer tokens(firstLine, " ", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM); - if (tokens.count() == 1 && tokens[0] == "closeconnection") + if (tokens.count() == 1 && tokens[0] == "disconnect") normalShutdown = true; - - if ((flags & WebSocket::FrameFlags::FRAME_FLAG_FIN) != WebSocket::FrameFlags::FRAME_FLAG_FIN) + else if ((flags & WebSocket::FrameFlags::FRAME_FLAG_FIN) != WebSocket::FrameFlags::FRAME_FLAG_FIN) { // One WS message split into multiple frames. std::vector<char> message(buffer, buffer + n); diff --git a/loolwsd/protocol.txt b/loolwsd/protocol.txt index e09734f..0c3db9b 100644 --- a/loolwsd/protocol.txt +++ b/loolwsd/protocol.txt @@ -17,13 +17,13 @@ canceltiles dropped and will not be handled. There is no guarantee of exactly which tile: messages might still be sent back to the client. -closeconnection +disconnect The socket is going to be shut down normally. This is to distinguish deliberate shutdown from the case when the connection was lost, or the browser was killed etc. -downloadas downloadas name=<fileName> id=<id> format=<document format> options=<SkipImages, etc> +downloadas name=<fileName> id=<id> format=<document format> options=<SkipImages, etc> Exports the current document to the desired format and returns a download URL The id identifies the request on the client. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits