From: Otto Moerbeek Date: Tue, 2 Apr 2019 08:08:53 +0000 (+0000) Subject: Move the setQuerySource() method to a wrapper in the syncres test code. X-Git-Tag: rec-4.1.12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7651%2Fhead;p=thirdparty%2Fpdns.git Move the setQuerySource() method to a wrapper in the syncres test code. --- diff --git a/pdns/recursordist/test-syncres_cc.cc b/pdns/recursordist/test-syncres_cc.cc index baccecf5ed..e6e6acee24 100644 --- a/pdns/recursordist/test-syncres_cc.cc +++ b/pdns/recursordist/test-syncres_cc.cc @@ -15,6 +15,18 @@ #include "utility.hh" #include "validate-recursor.hh" +// We need the method below for the ECS tests +class TestSyncRes : public SyncRes { +public: + TestSyncRes(const timeval& now) : SyncRes(now) {} + void setQuerySource(const ComboAddress& requestor, boost::optional incomingECS) { + setIncomingECSFound(); + setIncomingECS(incomingECS); + } +}; + +#define SyncRes TestSyncRes + RecursorStats g_stats; GlobalStateHolder g_luaconfs; thread_local std::unique_ptr t_RC{nullptr}; diff --git a/pdns/syncres.hh b/pdns/syncres.hh index a6a29f5345..a1be15465e 100644 --- a/pdns/syncres.hh +++ b/pdns/syncres.hh @@ -639,12 +639,6 @@ public: d_skipCNAMECheck = skip; } - void setQuerySource(const ComboAddress& requestor, boost::optional incomingECS) { - - setIncomingECSFound(); - setIncomingECS(incomingECS); - } - void setIncomingECS(boost::optional incomingECS); #ifdef HAVE_PROTOBUF