[Libreoffice-commits] online.git: 2 commits - wsd/ClientSession.cpp wsd/ClientSession.hpp wsd/DocumentBroker.cpp wsd/SenderQueue.hpp wsd/TileCache.cpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Aug 3 10:29:27 UTC 2018
wsd/ClientSession.cpp | 5 -----
wsd/ClientSession.hpp | 2 --
wsd/DocumentBroker.cpp | 3 ++-
wsd/SenderQueue.hpp | 9 ---------
wsd/TileCache.cpp | 4 +---
5 files changed, 3 insertions(+), 20 deletions(-)
New commits:
commit cec718d0f16ebf570a7e8e83c12b5cbe8ea857f2
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Aug 3 12:26:10 2018 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Aug 3 12:26:10 2018 +0200
Fix TileCacheTests::testCancelTilesMultiView failure
Change-Id: I9d05a1f041611a30f598c18c13525e807851604d
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 96112894b..2a307f3f7 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1449,6 +1449,8 @@ void DocumentBroker::cancelTileRequests(const std::shared_ptr<ClientSession>& se
session->clearTilesOnFly();
session->getRequestedTiles() = boost::none;
+ session->clearTileSubscription();
+
const std::string canceltiles = tileCache().cancelTiles(session);
if (!canceltiles.empty())
{
diff --git a/wsd/TileCache.cpp b/wsd/TileCache.cpp
index c6e6d72b7..139d325d2 100644
--- a/wsd/TileCache.cpp
+++ b/wsd/TileCache.cpp
@@ -568,7 +568,6 @@ std::string TileCache::cancelTiles(const std::shared_ptr<ClientSession> &subscri
++it;
}
- subscriber->clearTileSubscription();
const std::string canceltiles = oss.str();
return canceltiles.empty() ? canceltiles : "canceltiles " + canceltiles;
}
commit ec8b7bc012503559841c96c5a16c13798c103387
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Aug 3 12:21:29 2018 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Aug 3 12:21:29 2018 +0200
Revert "Cancel tiles also in wsd's senderqueue"
This reverts commit 0bb96131c495dfe1d98ebbfe01df5c4268d16de8.
Change-Id: Iffea072aabc88e5150e6ec069917b7965850683a
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 6f8e26aed..5b429c532 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -1040,11 +1040,6 @@ bool ClientSession::handleKitToClientMessage(const char* buffer, const int lengt
return forwardToClient(payload);
}
-void ClientSession::cancelTilesInQueue()
-{
- _senderQueue.cancelTiles();
-}
-
bool ClientSession::forwardToClient(const std::shared_ptr<Message>& payload)
{
if (isCloseFrame())
diff --git a/wsd/ClientSession.hpp b/wsd/ClientSession.hpp
index 29618a6cd..ae8a6937d 100644
--- a/wsd/ClientSession.hpp
+++ b/wsd/ClientSession.hpp
@@ -101,8 +101,6 @@ public:
}
}
- void cancelTilesInQueue();
-
/// Set the save-as socket which is used to send convert-to results.
void setSaveAsSocket(const std::shared_ptr<StreamSocket>& socket)
{
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index a0bb71902..96112894b 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1448,7 +1448,6 @@ void DocumentBroker::cancelTileRequests(const std::shared_ptr<ClientSession>& se
// Clear tile requests
session->clearTilesOnFly();
session->getRequestedTiles() = boost::none;
- session->cancelTilesInQueue();
const std::string canceltiles = tileCache().cancelTiles(session);
if (!canceltiles.empty())
diff --git a/wsd/SenderQueue.hpp b/wsd/SenderQueue.hpp
index 927e3e735..fc3464b3f 100644
--- a/wsd/SenderQueue.hpp
+++ b/wsd/SenderQueue.hpp
@@ -84,15 +84,6 @@ public:
}
}
- void cancelTiles()
- {
- std::remove_if(_queue.begin(), _queue.end(),
- [](const queue_item_t& cur)
- {
- return cur->firstToken() == "tile:";
- });
- }
-
private:
/// Deduplicate messages based on the new one.
/// Returns true if the new message should be
diff --git a/wsd/TileCache.cpp b/wsd/TileCache.cpp
index e2bf45c84..c6e6d72b7 100644
--- a/wsd/TileCache.cpp
+++ b/wsd/TileCache.cpp
@@ -533,7 +533,7 @@ std::string TileCache::cancelTiles(const std::shared_ptr<ClientSession> &subscri
assertCorrectThread();
- ClientSession* sub = subscriber.get();
+ const ClientSession* sub = subscriber.get();
std::ostringstream oss;
@@ -568,8 +568,7 @@ std::string TileCache::cancelTiles(const std::shared_ptr<ClientSession> &subscri
++it;
}
- if(sub)
- sub->clearTileSubscription();
+ subscriber->clearTileSubscription();
const std::string canceltiles = oss.str();
return canceltiles.empty() ? canceltiles : "canceltiles " + canceltiles;
}
More information about the Libreoffice-commits
mailing list