From: Karel Bilek Date: Wed, 10 Jun 2026 14:01:08 +0000 (+0200) Subject: dnsdist: remove unused iostatehandler add function X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e53b18ae8f90478fcda2f809124635e39b7556f;p=thirdparty%2Fpdns.git dnsdist: remove unused iostatehandler add function Signed-off-by: Karel Bilek --- diff --git a/pdns/dnsdistdist/tcpiohandler-mplexer.hh b/pdns/dnsdistdist/tcpiohandler-mplexer.hh index 601adddfde..6318adf7b1 100644 --- a/pdns/dnsdistdist/tcpiohandler-mplexer.hh +++ b/pdns/dnsdistdist/tcpiohandler-mplexer.hh @@ -74,43 +74,6 @@ public: return result; } - void add(IOState iostate, FDMultiplexer::callbackfunc_t callback, FDMultiplexer::funcparam_t callbackData, std::optional ttd) - { - DEBUGLOG("in " << __PRETTY_FUNCTION__ << " for fd " << d_fd << ", last state was " << getState() << ", adding " << (int)iostate); - if (iostate == IOState::NeedRead) { - if (isWaitingForRead()) { - if (ttd) { - /* let's update the TTD ! */ - d_mplexer.setReadTTD(d_fd, *ttd, /* we pass 0 here because we already have a TTD */ 0); - } - else { - d_mplexer.resetReadTTD(d_fd); - } - return; - } - - d_mplexer.addReadFD(d_fd, callback, callbackData, ttd ? &*ttd : nullptr); - DEBUGLOG(__PRETTY_FUNCTION__ << ": add read FD " << d_fd); - d_isWaitingForRead = true; - } - else if (iostate == IOState::NeedWrite) { - if (isWaitingForWrite()) { - if (ttd) { - /* let's update the TTD ! */ - d_mplexer.setWriteTTD(d_fd, *ttd, /* we pass 0 here because we already have a TTD */ 0); - } - else { - d_mplexer.resetWriteTTD(d_fd); - } - return; - } - - d_mplexer.addWriteFD(d_fd, callback, callbackData, ttd ? &*ttd : nullptr); - DEBUGLOG(__PRETTY_FUNCTION__ << ": add write FD " << d_fd); - d_isWaitingForWrite = true; - } - } - void update(IOState iostate, FDMultiplexer::callbackfunc_t callback = FDMultiplexer::callbackfunc_t(), FDMultiplexer::funcparam_t callbackData = boost::any(), std::optional ttd = std::nullopt) { DEBUGLOG("in " << __PRETTY_FUNCTION__ << " for fd " << d_fd << ", last state was " << getState() << " , new state is " << (int)iostate);