Permalink
Browse files

fix up statbag for carbon protocol and function pointers

  • Loading branch information...
1 parent a83257a commit 2f3498e91c9e8a00cbd0ab29c8f96293733891ae @ahupowerdns ahupowerdns committed with mind04 Dec 9, 2014
Showing with 3 additions and 1 deletion.
  1. +3 −1 pdns/statbag.cc
View
@@ -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];
}

0 comments on commit 2f3498e

Please sign in to comment.