[Libreoffice-commits] online.git: 3 commits - wsd/ClientSession.cpp wsd/ClientSession.hpp wsd/DocumentBroker.cpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Sep 21 14:07:48 UTC 2018


 wsd/ClientSession.cpp  |    4 ++--
 wsd/ClientSession.hpp  |    2 ++
 wsd/DocumentBroker.cpp |   13 +++++++------
 3 files changed, 11 insertions(+), 8 deletions(-)

New commits:
commit b623aca57ea47c785ab70ff6ccec58acbff63d75
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Sep 21 16:04:53 2018 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Sep 21 16:04:53 2018 +0200

    Use a bigger timeout for waiting tileprocessed message
    
    The main purpose of this time-out is to avoid waiting forever for lost
    tile messages, but since it rare to loose them we can use bigger value,
    so we can avoid to send new tiles to a slow network.
    
    Note that the used time stamp does not mean the time when the tile
    actually send to the client, but the time when it gets to the sender
    queue.
    
    Change-Id: I230d85c38b3a5dafd195851d0cf4caac23149e3e

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index a6e2c5ac0..317024d8b 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -1073,7 +1073,7 @@ void ClientSession::removeOutdatedTilesOnFly()
     {
         auto tileIter = _tilesOnFly.begin();
         double elapsedTimeMs = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - tileIter->second).count();
-        if(elapsedTimeMs > 3000)
+        if(elapsedTimeMs > 5000.0)
         {
             LOG_WRN("Tracker tileID was dropped because of time out. Tileprocessed message did not arrive");
             _tilesOnFly.erase(tileIter);
commit 0807d04934476a5c27ada9b1938fd7b94147e012
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Sep 21 15:52:08 2018 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Sep 21 16:01:44 2018 +0200

    Convert this warning to info
    
    There valid cases when we get unknown tileID. For example we
    sent some tiles, but in the meantime canceltiles arrives which
    resets tiles-on-fly list, but the client still send tileprocessed
    messages for earlier requested tiles.
    
    Change-Id: If2ec015106a0e58d66ae4517b64a9552eb8c38fc

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index ad623b25d..a6e2c5ac0 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -352,7 +352,7 @@ bool ClientSession::_handleInput(const char *buffer, int length)
         if(iter != _tilesOnFly.end())
             _tilesOnFly.erase(iter);
         else
-            LOG_WRN("Tileprocessed message with an unknown tile ID");
+            LOG_INF("Tileprocessed message with an unknown tile ID");
 
         docBroker->sendRequestedTiles(shared_from_this());
         return true;
commit 4b13430f6d63d950c07cb9ceda4e1bca7bec6422
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Sep 21 15:49:30 2018 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Sep 21 16:01:44 2018 +0200

    Fix warning: in case of a text document part number has no meaning
    
    In this case the part number is undefined, somewhere it is set to 0 or 1,
    but has no meaning at all. Just avoid using it with text ducments.
    
    Change-Id: Ic98217bf3ea6c86d37c34e42302bf456f7274975

diff --git a/wsd/ClientSession.hpp b/wsd/ClientSession.hpp
index 2efd26624..326ff50c0 100644
--- a/wsd/ClientSession.hpp
+++ b/wsd/ClientSession.hpp
@@ -150,6 +150,8 @@ public:
 
     /// Clear wireId map anytime when client visible area changes (visible area, zoom, part number)
     void resetWireIdMap();
+
+    bool isTextDocument() const { return _isTextDocument; }
 private:
 
     /// SocketHandler: disconnection event.
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 79d410407..7fe5646ee 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1357,13 +1357,14 @@ void DocumentBroker::handleTileCombinedRequest(TileCombined& tileCombined,
         for (const auto& newTile : tileCombined.getTiles())
         {
             const TileDesc& firstOldTile = *(requestedTiles.begin());
-            if(newTile.getPart() != firstOldTile.getPart() ||
-               newTile.getWidth() != firstOldTile.getWidth() ||
-               newTile.getHeight() != firstOldTile.getHeight() ||
-               newTile.getTileWidth() != firstOldTile.getTileWidth() ||
-               newTile.getTileHeight() != firstOldTile.getTileHeight() )
+            if(!session->isTextDocument() && newTile.getPart() != firstOldTile.getPart())
             {
-                LOG_WRN("Different visible area information in tile requests");
+                LOG_WRN("Different part numbers in tile requests");
+            }
+            else if (newTile.getTileWidth() != firstOldTile.getTileWidth() ||
+                     newTile.getTileHeight() != firstOldTile.getTileHeight() )
+            {
+                LOG_WRN("Different tile sizes in tile requests");
             }
 
             bool tileFound = false;


More information about the Libreoffice-commits mailing list