From: Remi Gacogne Date: Thu, 24 Oct 2019 08:34:20 +0000 (+0200) Subject: dnsdist: Use qualified calls to virtual functions in the ctor X-Git-Tag: dnsdist-1.4.0-rc4~2^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8dfec397200bbe92c831b37b2fb7e6c874cbfbf8;p=pdns dnsdist: Use qualified calls to virtual functions in the ctor Otherwise cppcheck warns that virtual functions should not be called from the constructor because dynamic binding is not used, and objects may not have been fully constructed yet. In that case that's fine because there is no derived classes, but let's make it explicit. --- diff --git a/pdns/dnsdistdist/tcpiohandler.cc b/pdns/dnsdistdist/tcpiohandler.cc index 02b19454b..532cfab55 100644 --- a/pdns/dnsdistdist/tcpiohandler.cc +++ b/pdns/dnsdistdist/tcpiohandler.cc @@ -286,7 +286,7 @@ public: handleTicketsKeyRotation(time(nullptr)); } else { - loadTicketsKeys(fe.d_tlsConfig.d_ticketKeyFile); + OpenSSLTLSIOCtx::loadTicketsKeys(fe.d_tlsConfig.d_ticketKeyFile); } } catch (const std::exception& e) { @@ -351,7 +351,7 @@ public: } } - void loadTicketsKeys(const std::string& keyFile) override + void loadTicketsKeys(const std::string& keyFile) override final { d_ticketKeys.loadTicketsKeys(keyFile); @@ -776,7 +776,7 @@ public: handleTicketsKeyRotation(time(nullptr)); } else { - loadTicketsKeys(fe.d_tlsConfig.d_ticketKeyFile); + GnuTLSIOCtx::loadTicketsKeys(fe.d_tlsConfig.d_ticketKeyFile); } } catch(const std::runtime_error& e) { @@ -827,7 +827,7 @@ public: } } - void loadTicketsKeys(const std::string& file) override + void loadTicketsKeys(const std::string& file) override final { if (!d_enableTickets) { return;