From 3cd01b932e1c85394272ae64fae67ebeda92fb00 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 23:11:59 +0200 Subject: Adding upstream version 1.8.3. Signed-off-by: Daniel Baumann --- statnode.cc | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 statnode.cc (limited to 'statnode.cc') diff --git a/statnode.cc b/statnode.cc new file mode 100644 index 0000000..a2b4934 --- /dev/null +++ b/statnode.cc @@ -0,0 +1,137 @@ +#include "statnode.hh" + +StatNode::Stat StatNode::print(unsigned int depth, Stat newstat, bool silent) const +{ + if(!silent) { + cout<1024 && !silent) { + cout<1024); + } + if(!silent || children.size()>1) + cout< remote) +{ + // cerr<<"FIRST submit called on '"< tmp = domain.getRawLabels(); + if (tmp.empty()) { + return; + } + + auto last = tmp.end() - 1; + children[*last].submit(last, tmp.begin(), "", rcode, bytes, remote, 1, hit); +} + +/* www.powerdns.com. -> + . <- fullnames + com. + powerdns.com + www.powerdns.com. +*/ + +void StatNode::submit(std::vector::const_iterator end, std::vector::const_iterator begin, const std::string& domain, int rcode, unsigned int bytes, boost::optional remote, unsigned int count, bool hit) +{ + // cerr<<"Submit called for domain='"<