loolwsd/LOOLSession.cpp | 6 +++--- loolwsd/LOOLWSD.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-)
New commits: commit 0d80d63cb415e0bbc9de6e405f90923eae4df937 Author: Mihai Varga <mihai.va...@collabora.com> Date: Tue Jul 14 19:46:29 2015 +0300 loolwsd: don't cancel special tile requests that have an ID diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index 631e2b3..61fe7a6 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -235,7 +235,9 @@ public: // "tile" messages from the queue. if (tokens.count() == 1 && tokens[0] == "canceltiles") { - queue.remove_if([](std::string& x){ return x.find("tile ") == 0;}); + queue.remove_if([](std::string& x) { + return (x.find("tile ") == 0 && x.find("id=") == std::string::npos); + }); // Also forward the "canceltiles" to the child process, if any session->handleInput(buffer, n); @@ -870,7 +872,9 @@ void LOOLWSD::componentMain() // "tile" messages from the queue. if (tokens.count() == 1 && tokens[0] == "canceltiles") { - queue.remove_if([](std::string& x){ return x.find("tile ") == 0;}); + queue.remove_if([](std::string& x) { + return (x.find("tile ") == 0 && x.find("id=") == std::string::npos); + }); } else { commit 97191d985b6b9a38227fef4d162b26c61800dbc5 Author: Mihai Varga <mihai.va...@collabora.com> Date: Tue Jul 14 19:46:04 2015 +0300 loolwsd: allow an extra paramater to the tile command (ID) diff --git a/loolwsd/LOOLSession.cpp b/loolwsd/LOOLSession.cpp index 0fdf4d8..0e73bf6 100644 --- a/loolwsd/LOOLSession.cpp +++ b/loolwsd/LOOLSession.cpp @@ -171,7 +171,7 @@ bool MasterProcessSession::handleInput(const char *buffer, int length) if (tokens[0] == "tile:") { int part, width, height, tilePosX, tilePosY, tileWidth, tileHeight; - if (tokens.count() != 8 || + if (tokens.count() < 8 || !getTokenInteger(tokens[1], "part", part) || !getTokenInteger(tokens[2], "width", width) || !getTokenInteger(tokens[3], "height", height) || @@ -409,7 +409,7 @@ void MasterProcessSession::sendTile(const char *buffer, int length, StringTokeni { int part, width, height, tilePosX, tilePosY, tileWidth, tileHeight; - if (tokens.count() != 8 || + if (tokens.count() < 8 || !getTokenInteger(tokens[1], "part", part) || !getTokenInteger(tokens[2], "width", width) || !getTokenInteger(tokens[3], "height", height) || @@ -780,7 +780,7 @@ void ChildProcessSession::sendTile(const char *buffer, int length, StringTokeniz { int part, width, height, tilePosX, tilePosY, tileWidth, tileHeight; - if (tokens.count() != 8 || + if (tokens.count() < 8 || !getTokenInteger(tokens[1], "part", part) || !getTokenInteger(tokens[2], "width", width) || !getTokenInteger(tokens[3], "height", height) || _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits