[Libreoffice-commits] online.git: common/Unit.hpp test/UnitFuzz.cpp wsd/ClientSession.cpp wsd/ClientSession.hpp wsd/LOOLWSD.cpp wsd/TestStubs.cpp
Michael Meeks (via logerrit)
logerrit at kemper.freedesktop.org
Sat Mar 7 13:27:00 UTC 2020
common/Unit.hpp | 9 ---------
test/UnitFuzz.cpp | 8 --------
wsd/ClientSession.cpp | 10 ----------
wsd/ClientSession.hpp | 2 --
wsd/LOOLWSD.cpp | 5 -----
wsd/TestStubs.cpp | 2 --
6 files changed, 36 deletions(-)
New commits:
commit 7eea5b85ab84b494c4c97759aaea8f7c26d966d0
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Sat Mar 7 11:22:43 2020 +0000
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Mar 7 14:26:42 2020 +0100
Remove unused filterHandleRequest unit test hook.
Change-Id: Id1ff6005e28bf02eb9cad3c1609f9a8079640689
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90155
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/common/Unit.hpp b/common/Unit.hpp
index 3e75f8b24..25e903a3b 100644
--- a/common/Unit.hpp
+++ b/common/Unit.hpp
@@ -201,15 +201,6 @@ public:
{
return false;
}
- /// Intercept incoming requests, so unit tests can silently communicate
- virtual bool filterHandleRequest(
- TestRequest /* type */,
- SocketDisposition & /* disposition */,
- WebSocketHandler & /* handler */)
- {
- return false;
- }
-
/// Child sent a message
virtual bool filterChildMessage(const std::vector<char>& /* payload */)
{
diff --git a/test/UnitFuzz.cpp b/test/UnitFuzz.cpp
index 940c9dcf8..fe585eaa5 100644
--- a/test/UnitFuzz.cpp
+++ b/test/UnitFuzz.cpp
@@ -117,14 +117,6 @@ public:
return true;
}
-
- virtual bool filterHandleRequest(
- TestRequest /* type */,
- SocketDisposition & /* disposition */,
- WebSocketHandler & /* socket */) override
- {
- return false;
- }
};
// Inside the forkit & kit processes
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 5639448e7..4bd43e445 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -310,16 +310,6 @@ void ClientSession::handleClipboardRequest(DocumentBroker::ClipboardRequest
}
}
-void ClientSession::handleIncomingMessage(SocketDisposition &disposition)
-{
- // LOG_TRC("***** ClientSession::handleIncomingMessage()");
- if (UnitWSD::get().filterHandleRequest(
- UnitWSD::TestRequest::Client, disposition, *this))
- return;
-
- Session::handleIncomingMessage(disposition);
-}
-
bool ClientSession::_handleInput(const char *buffer, int length)
{
LOG_TRC(getName() << ": handling incoming [" << getAbbreviatedMessage(buffer, length) << "].");
diff --git a/wsd/ClientSession.hpp b/wsd/ClientSession.hpp
index e04a01641..fe39b9e7d 100644
--- a/wsd/ClientSession.hpp
+++ b/wsd/ClientSession.hpp
@@ -40,8 +40,6 @@ public:
/// Lookup any session by id.
static std::shared_ptr<ClientSession> getById(const std::string &id);
- void handleIncomingMessage(SocketDisposition &) override;
-
void setReadOnly() override;
enum SessionState {
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 6eaa05020..8ab895ec8 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1856,11 +1856,6 @@ private:
void handleIncomingMessage(SocketDisposition &disposition) override
{
// LOG_TRC("***** PrisonerRequestDispatcher::handleIncomingMessage()");
-
- if (UnitWSD::get().filterHandleRequest(
- UnitWSD::TestRequest::Prisoner, disposition, *this))
- return;
-
if (_childProcess.lock())
{
// FIXME: inelegant etc. - derogate to websocket code
diff --git a/wsd/TestStubs.cpp b/wsd/TestStubs.cpp
index 0331f7ef6..b75499ec2 100644
--- a/wsd/TestStubs.cpp
+++ b/wsd/TestStubs.cpp
@@ -33,8 +33,6 @@ void ClientSession::dumpState(std::ostream& /*os*/) {}
void ClientSession::setReadOnly() {}
-void ClientSession::handleIncomingMessage(SocketDisposition &) {}
-
bool ClientSession::_handleInput(const char* /*buffer*/, int /*length*/) { return false; }
int ClientSession::getPollEvents(std::chrono::steady_clock::time_point /* now */, int & /* timeoutMaxMs */) { return 0; }
More information about the Libreoffice-commits
mailing list