From 8dfec397200bbe92c831b37b2fb7e6c874cbfbf8 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 24 Oct 2019 10:34:20 +0200 Subject: [PATCH] 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. --- pdns/dnsdistdist/tcpiohandler.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pdns/dnsdistdist/tcpiohandler.cc b/pdns/dnsdistdist/tcpiohandler.cc index 02b19454b8..532cfab552 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; -- 2.47.2