]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: squelch unused function warning 7952/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 19 Jun 2019 12:09:14 +0000 (14:09 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 19 Jun 2019 12:09:14 +0000 (14:09 +0200)
Only compile the loadTLSCertificateAndKeys fucntion when DoT and/or DoH
are enabled.

pdns/dnsdist-lua.cc

index aab963cf6675544865fb5d86c8f1dd9f4a836bcd..f27fd87f71a3eb470ffe2cd9ec42a720d0b5d74c 100644 (file)
@@ -109,6 +109,7 @@ static void parseLocalBindVars(boost::optional<localbind_t> vars, bool& reusePor
   }
 }
 
+#if defined(HAVE_DNS_OVER_TLS) || defined(HAVE_DNS_OVER_HTTPS)
 static bool loadTLSCertificateAndKeys(const std::string& context, std::vector<std::pair<std::string, std::string>>& pairs, boost::variant<std::string, std::vector<std::pair<int,std::string>>> certFiles, boost::variant<std::string, std::vector<std::pair<int,std::string>>> keyFiles)
 {
   if (certFiles.type() == typeid(std::string) && keyFiles.type() == typeid(std::string)) {
@@ -141,6 +142,7 @@ static bool loadTLSCertificateAndKeys(const std::string& context, std::vector<st
 
   return true;
 }
+#endif // defined(HAVE_DNS_OVER_TLS) || defined(HAVE_DNS_OVER_HTTPS)
 
 void setupLuaConfig(bool client)
 {