[Libreoffice-commits] online.git: kit/Kit.cpp Makefile.am wsd/QueueHandler.hpp
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 2 15:26:26 UTC 2020
Makefile.am | 1
kit/Kit.cpp | 5 +--
wsd/QueueHandler.hpp | 70 ---------------------------------------------------
3 files changed, 2 insertions(+), 74 deletions(-)
New commits:
commit 68bdbcf79858f762b4a56f74d45a6455dfcaa0db
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Tue Jun 2 00:36:32 2020 -0400
Commit: Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Tue Jun 2 17:26:08 2020 +0200
wsd: remove unused QueueHandler
Change-Id: Iec80d2afb1762175088b92a6e7140b0ca863a483
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95339
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/Makefile.am b/Makefile.am
index d3c79a36b..ca868c8e7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -224,7 +224,6 @@ wsd_headers = wsd/Admin.hpp \
wsd/FileServer.hpp \
wsd/LOOLWSD.hpp \
wsd/ProofKey.hpp \
- wsd/QueueHandler.hpp \
wsd/RequestDetails.hpp \
wsd/SenderQueue.hpp \
wsd/ServerURL.hpp \
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index da722b369..367ca60c0 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -48,7 +48,6 @@
#include <Poco/Net/HTTPResponse.h>
#include <Poco/Net/NetException.h>
#include <Poco/Net/Socket.h>
-#include <Poco/Runnable.h>
#include <Poco/URI.h>
#include "ChildSession.hpp"
@@ -2039,7 +2038,7 @@ public:
}
catch (const std::exception& exc)
{
- LOG_FTL("QueueHandler::run: Exception: " << exc.what());
+ LOG_FTL("drainQueue: Exception: " << exc.what());
#if !MOBILEAPP
Log::shutdown();
std::_Exit(EX_SOFTWARE);
@@ -2047,7 +2046,7 @@ public:
}
catch (...)
{
- LOG_FTL("QueueHandler::run: Unknown exception");
+ LOG_FTL("drainQueue: Unknown exception");
#if !MOBILEAPP
Log::shutdown();
std::_Exit(EX_SOFTWARE);
diff --git a/wsd/QueueHandler.hpp b/wsd/QueueHandler.hpp
deleted file mode 100644
index 434742ea8..000000000
--- a/wsd/QueueHandler.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#pragma once
-
-#include <Poco/Runnable.h>
-
-#include "Protocol.hpp"
-#include "Session.hpp"
-#include "MessageQueue.hpp"
-#include "Util.hpp"
-
-/// This thread handles incoming messages on a given kit instance.
-class QueueHandler : public Poco::Runnable
-{
-public:
- QueueHandler(std::shared_ptr<MessageQueue> queue,
- const std::shared_ptr<Session>& session,
- const std::string& name):
- _queue(std::move(queue)),
- _session(session),
- _name(name)
- {
- }
-
- void run() override
- {
- Util::setThreadName(_name);
-
- LOG_DBG("Thread started.");
-
- try
- {
- while (true)
- {
- const auto input = _queue->get();
- if (LOOLProtocol::getFirstToken(input) == "eof")
- {
- LOG_INF("Received EOF. Finishing.");
- break;
- }
-
- if (!_session->handleInput(input.data(), input.size()))
- {
- LOG_INF("Socket handler flagged for finishing.");
- break;
- }
- }
- }
- catch (const std::exception& exc)
- {
- LOG_ERR("QueueHandler::run: Exception: " << exc.what());
- }
-
- LOG_DBG("Thread finished.");
- }
-
-private:
- std::shared_ptr<MessageQueue> _queue;
- std::shared_ptr<Session> _session;
- const std::string _name;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list