From: Remi Gacogne Date: Tue, 29 May 2018 14:13:44 +0000 (+0200) Subject: rec: Pass the remote logger to asyncresolve() by reference X-Git-Tag: dnsdist-1.3.1~47^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f3e77c2789c8bffb805d64736919a4f934ec4a6;p=pdns rec: Pass the remote logger to asyncresolve() by reference --- diff --git a/pdns/lwres.cc b/pdns/lwres.cc index f97dac18e..b007aca10 100644 --- a/pdns/lwres.cc +++ b/pdns/lwres.cc @@ -90,7 +90,7 @@ static void logIncomingResponse(std::shared_ptr outgoingLogger, bo /** lwr is only filled out in case 1 was returned, and even when returning 1 for 'success', lwr might contain DNS errors Never throws! */ -int asyncresolve(const ComboAddress& ip, const DNSName& domain, int type, bool doTCP, bool sendRDQuery, int EDNS0Level, struct timeval* now, boost::optional& srcmask, boost::optional context, std::shared_ptr outgoingLogger, LWResult *lwr, bool* chained) +int asyncresolve(const ComboAddress& ip, const DNSName& domain, int type, bool doTCP, bool sendRDQuery, int EDNS0Level, struct timeval* now, boost::optional& srcmask, boost::optional context, const std::shared_ptr& outgoingLogger, LWResult *lwr, bool* chained) { size_t len; size_t bufsize=g_outgoingEDNSBufsize; diff --git a/pdns/lwres.hh b/pdns/lwres.hh index 96e931dd2..98c3f0845 100644 --- a/pdns/lwres.hh +++ b/pdns/lwres.hh @@ -68,5 +68,5 @@ public: bool d_haveEDNS{false}; }; -int asyncresolve(const ComboAddress& ip, const DNSName& domain, int type, bool doTCP, bool sendRDQuery, int EDNS0Level, struct timeval* now, boost::optional& srcmask, boost::optional context, std::shared_ptr outgoingLogger, LWResult* res, bool* chained); +int asyncresolve(const ComboAddress& ip, const DNSName& domain, int type, bool doTCP, bool sendRDQuery, int EDNS0Level, struct timeval* now, boost::optional& srcmask, boost::optional context, const std::shared_ptr& outgoingLogger, LWResult* res, bool* chained); #endif // PDNS_LWRES_HH diff --git a/pdns/recursordist/test-syncres_cc.cc b/pdns/recursordist/test-syncres_cc.cc index 68871d2c6..20aa09968 100644 --- a/pdns/recursordist/test-syncres_cc.cc +++ b/pdns/recursordist/test-syncres_cc.cc @@ -39,7 +39,7 @@ bool RecursorLua4::preoutquery(const ComboAddress& ns, const ComboAddress& reque return false; } -int asyncresolve(const ComboAddress& ip, const DNSName& domain, int type, bool doTCP, bool sendRDQuery, int EDNS0Level, struct timeval* now, boost::optional& srcmask, boost::optional context, std::shared_ptr outgoingLogger, LWResult* res, bool* chained) +int asyncresolve(const ComboAddress& ip, const DNSName& domain, int type, bool doTCP, bool sendRDQuery, int EDNS0Level, struct timeval* now, boost::optional& srcmask, boost::optional context, const std::shared_ptr& outgoingLogger, LWResult* res, bool* chained) { return 0; }