From: bert hubert Date: Tue, 9 Dec 2014 20:42:04 +0000 (+0100) Subject: fix up statbag for carbon protocol and function pointers X-Git-Tag: auth-3.4.2~15^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f3498e91c9e8a00cbd0ab29c8f96293733891ae;p=thirdparty%2Fpdns.git fix up statbag for carbon protocol and function pointers --- diff --git a/pdns/statbag.cc b/pdns/statbag.cc index a2489eb06f..1c8f3bfada 100644 --- a/pdns/statbag.cc +++ b/pdns/statbag.cc @@ -114,7 +114,9 @@ void StatBag::set(const string &key, AtomicCounter::native_t value) AtomicCounter::native_t StatBag::read(const string &key) { exists(key); - + funcstats_t::const_iterator iter = d_funcstats.find(key); + if(iter != d_funcstats.end()) + return iter->second(iter->first); return *d_stats[key]; }