From 4244345eff19caefd671f33b56cdb15852aee668 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sun, 6 May 2018 09:53:03 -0400 Subject: [PATCH] more --- contrib/backends/nntpchan-daemon/include/nntpchan/line.hpp | 6 ------ contrib/backends/nntpchan-daemon/libnntpchan/line.cpp | 3 --- contrib/backends/nntpchan-daemon/libnntpchan/nntp_auth.cpp | 2 +- .../backends/nntpchan-daemon/libnntpchan/nntp_handler.cpp | 2 +- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/contrib/backends/nntpchan-daemon/include/nntpchan/line.hpp b/contrib/backends/nntpchan-daemon/include/nntpchan/line.hpp index 3535785..8ab6982 100644 --- a/contrib/backends/nntpchan-daemon/include/nntpchan/line.hpp +++ b/contrib/backends/nntpchan-daemon/include/nntpchan/line.hpp @@ -11,14 +11,10 @@ namespace nntpchan class LineReader { public: - LineReader(size_t lineLimit); /** @brief queue inbound data from connection */ void Data(const char *data, ssize_t s); - /** implements IConnHandler */ - virtual bool ShouldClose(); - protected: /** @brief handle a line from the client */ virtual void HandleLine(const std::string line) = 0; @@ -27,8 +23,6 @@ private: std::stringstream m_line; std::string m_leftover; - bool m_close; - const size_t lineLimit; }; } diff --git a/contrib/backends/nntpchan-daemon/libnntpchan/line.cpp b/contrib/backends/nntpchan-daemon/libnntpchan/line.cpp index 48e2c94..c25a900 100644 --- a/contrib/backends/nntpchan-daemon/libnntpchan/line.cpp +++ b/contrib/backends/nntpchan-daemon/libnntpchan/line.cpp @@ -3,8 +3,6 @@ namespace nntpchan { -LineReader::LineReader(size_t limit) : m_close(false), lineLimit(limit) {} - void LineReader::Data(const char *data, ssize_t l) { if (l <= 0) @@ -23,5 +21,4 @@ void LineReader::Data(const char *data, ssize_t l) m_line.clear(); } -bool LineReader::ShouldClose() { return m_close; } } diff --git a/contrib/backends/nntpchan-daemon/libnntpchan/nntp_auth.cpp b/contrib/backends/nntpchan-daemon/libnntpchan/nntp_auth.cpp index d48697e..a7b08fa 100644 --- a/contrib/backends/nntpchan-daemon/libnntpchan/nntp_auth.cpp +++ b/contrib/backends/nntpchan-daemon/libnntpchan/nntp_auth.cpp @@ -7,7 +7,7 @@ namespace nntpchan { -HashedCredDB::HashedCredDB() : LineReader(1024) {} +HashedCredDB::HashedCredDB() : LineReader() {} bool HashedCredDB::CheckLogin(const std::string &user, const std::string &passwd) { diff --git a/contrib/backends/nntpchan-daemon/libnntpchan/nntp_handler.cpp b/contrib/backends/nntpchan-daemon/libnntpchan/nntp_handler.cpp index 937503d..a4c675f 100644 --- a/contrib/backends/nntpchan-daemon/libnntpchan/nntp_handler.cpp +++ b/contrib/backends/nntpchan-daemon/libnntpchan/nntp_handler.cpp @@ -10,7 +10,7 @@ namespace nntpchan { NNTPServerHandler::NNTPServerHandler(fs::path storage) - : LineReader(1024), m_article(nullptr), m_auth(nullptr), m_store(storage), m_authed(false), + : LineReader(), m_article(nullptr), m_auth(nullptr), m_store(storage), m_authed(false), m_state(eStateReadCommand) { }