]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: print stats from expungeByName 7909/head
authorMatti Hiljanen <matti@hiljanen.com>
Wed, 12 Jun 2019 08:10:38 +0000 (11:10 +0300)
committerMatti Hiljanen <matti@hiljanen.com>
Wed, 12 Jun 2019 08:10:38 +0000 (11:10 +0300)
pdns/dnsdist-lua-bindings.cc

index 64b48b6c5833044076a90db2bc5753de54081229..d29081e100603277f9e85f57d2a0a9f2d1a8a4fd 100644 (file)
@@ -320,7 +320,7 @@ void setupLuaBindings(bool client)
               boost::optional<uint16_t> qtype,
               boost::optional<bool> suffixMatch) {
                 if (cache) {
-                  cache->expungeByName(dname, qtype ? *qtype : QType(QType::ANY).getCode(), suffixMatch ? *suffixMatch : false);
+                  g_outputBuffer="Expunged " + std::to_string(cache->expungeByName(dname, qtype ? *qtype : QType(QType::ANY).getCode(), suffixMatch ? *suffixMatch : false)) + " records\n";
                 }
     });
   g_lua.registerFunction<void(std::shared_ptr<DNSDistPacketCache>::*)()>("printStats", [](const std::shared_ptr<DNSDistPacketCache> cache) {