From: Peter van Dijk Date: Sat, 17 Mar 2018 13:15:49 +0000 (+0100) Subject: It turns out CURLOPT_RESOLVE is not a #define at all. X-Git-Tag: dnsdist-1.3.1~136^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d5bf0bb00e6fb34d8ba4202ea4ebcb7b5f7975d;p=thirdparty%2Fpdns.git It turns out CURLOPT_RESOLVE is not a #define at all. Revert "unbreak el6 build" This reverts commit 5941d59a9738a5246823e984518b8ac9fa7f9541. --- diff --git a/pdns/lua-record.cc b/pdns/lua-record.cc index 12e0b27d9e..8f21f83d9f 100644 --- a/pdns/lua-record.cc +++ b/pdns/lua-record.cc @@ -28,7 +28,6 @@ pool of UeberBackends? */ -#ifdef CURLOPT_RESOLVE class IsUpOracle { private: @@ -179,6 +178,7 @@ void IsUpOracle::checkTCPThread(ComboAddress rem, opts_t opts) } } + void IsUpOracle::checkURLThread(ComboAddress rem, std::string url, opts_t opts) { setDown(rem, url, opts); @@ -212,12 +212,9 @@ void IsUpOracle::checkURLThread(ComboAddress rem, std::string url, opts_t opts) sleep(5); } } -#endif -#ifdef CURLOPT_RESOLVE -IsUpOracle g_up; -#endif +IsUpOracle g_up; namespace { template bool doCompare(const T& var, const std::string& res, const C& cmp) @@ -611,7 +608,7 @@ std::vector> luaSynth(const std::string& code, cons return std::string("unknown"); }); -#ifdef CURLOPT_RESOLVE + lua.writeFunction("ifportup", [&bestwho](int port, const vector >& ips, const boost::optional> options) { vector candidates; std::unordered_map opts; @@ -690,7 +687,6 @@ std::vector> luaSynth(const std::string& code, cons return ret; }); -#endif diff --git a/pdns/minicurl.cc b/pdns/minicurl.cc index af67b834b6..99b6dfe40a 100644 --- a/pdns/minicurl.cc +++ b/pdns/minicurl.cc @@ -33,7 +33,6 @@ static string extractHostFromURL(const std::string& url) return url.substr(pos, endpos-pos); } -#ifdef CURLOPT_RESOLVE void MiniCurl::setupURL(const std::string& str, const ComboAddress* rem, const ComboAddress* src) { if(rem) { @@ -67,7 +66,6 @@ void MiniCurl::setupURL(const std::string& str, const ComboAddress* rem, const C d_data.clear(); } - std::string MiniCurl::getURL(const std::string& str, const ComboAddress* rem, const ComboAddress* src) { setupURL(str, rem, src); @@ -97,4 +95,3 @@ std::string MiniCurl::postURL(const std::string& str, const std::string& postdat d_data.clear(); return ret; } -#endif \ No newline at end of file