From: Remi Gacogne Date: Fri, 18 Aug 2023 06:53:16 +0000 (+0200) Subject: dnsdist: Apply suggestions from Charles-Henri Bruyand's review (thanks!) X-Git-Tag: rec-5.0.0-alpha1~19^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d068b483428bae2fde71b5c861cd4e8d59366f4;p=thirdparty%2Fpdns.git dnsdist: Apply suggestions from Charles-Henri Bruyand's review (thanks!) --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index d5c27f4de3..4dd374f94c 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -2348,7 +2348,6 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck) if (frontend->d_library == "h2o") { #ifdef HAVE_LIBH2OEVLOOP frontend = std::make_shared(); - frontend->d_library = "h2o"; #else /* HAVE_LIBH2OEVLOOP */ errlog("DOH bind %s is configured to use libh2o but the library is not available", addr); return; diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index 19e477ce79..a23c03f048 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -2584,13 +2584,13 @@ int main(int argc, char** argv) cout<<"dns-over-https("; #ifdef HAVE_LIBH2OEVLOOP cout<<"h2o"; -#ifdef HAVE_NGHTTP2 - cout<<" "; -#endif #endif /* HAVE_LIBH2OEVLOOP */ +#if defined(HAVE_LIBH2OEVLOOP) && defined(HAVE_NGHTTP2) + cout<<" "; +#endif /* defined(HAVE_LIBH2OEVLOOP) && defined(HAVE_NGHTTP2) */ #ifdef HAVE_NGHTTP2 cout<<"nghttp2"; -#endif +#endif /* HAVE_NGHTTP2 */ cout<<") "; #endif /* HAVE_DNS_OVER_HTTPS */ #ifdef HAVE_DNSCRYPT diff --git a/pdns/dnsdistdist/doh.cc b/pdns/dnsdistdist/doh.cc index 4d7f53e92b..3111274e26 100644 --- a/pdns/dnsdistdist/doh.cc +++ b/pdns/dnsdistdist/doh.cc @@ -1618,7 +1618,7 @@ void dohThread(ClientState* clientState) } } -void DOHUnit::handleUDPResponse(PacketBuffer&& udpResponse, InternalQueryState&& state, [[maybe_unused]] const std::shared_ptr& downstream) +void DOHUnit::handleUDPResponse(PacketBuffer&& udpResponse, InternalQueryState&& state, [[maybe_unused]] const std::shared_ptr& downstream_) { auto dohUnit = std::unique_ptr(this); dohUnit->ids = std::move(state);