From e014a79ef2173e838f0fd15be5da8508e4074fc1 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 2 Apr 2019 08:08:53 +0000 Subject: [PATCH] Move the setQuerySource() method to a wrapper in the syncres test code. --- pdns/recursordist/test-syncres_cc.cc | 12 ++++++++++++ pdns/syncres.hh | 6 ------ 2 files changed, 12 insertions(+), 6 deletions(-) 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 -- 2.47.2