diff options
author | Kazunori Fujiwara <fujiwara@wide.ad.jp> | 2013-07-08 05:05:41 +0200 |
---|---|---|
committer | Kazunori Fujiwara <fujiwara@wide.ad.jp> | 2013-07-08 13:05:31 +0200 |
commit | 3506d2445092477473a9f15134b8de39dd91aa4d (patch) | |
tree | 0a25dc300dcea960d7741e0272681f2e8fac17a4 | |
parent | [3016] added 64bit counter test (it takes 10 seconds) (diff) | |
download | kea-3506d2445092477473a9f15134b8de39dd91aa4d.tar.xz kea-3506d2445092477473a9f15134b8de39dd91aa4d.zip |
[3016] Counter::Value is changed to uint64_t and auth outputs 63bit of values
-rw-r--r-- | src/bin/auth/statistics.cc.pre | 6 | ||||
-rw-r--r-- | src/lib/statistics/counter.h | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/bin/auth/statistics.cc.pre b/src/bin/auth/statistics.cc.pre index 14341fe5f5..210421811a 100644 --- a/src/bin/auth/statistics.cc.pre +++ b/src/bin/auth/statistics.cc.pre @@ -26,6 +26,8 @@ #include <boost/optional.hpp> +#include <stdint.h> + using namespace isc::dns; using namespace isc::auth; using namespace isc::statistics; @@ -53,8 +55,8 @@ fillNodes(const Counter& counter, fillNodes(counter, type_tree[i].sub_counters, sub_counters); } else { trees->set(type_tree[i].name, - Element::create(static_cast<long int>( - counter.get(type_tree[i].counter_id))) + Element::create(static_cast<int64_t>( + counter.get(type_tree[i].counter_id) & 0x7fffffffffffffff)) ); } } diff --git a/src/lib/statistics/counter.h b/src/lib/statistics/counter.h index 32d025e716..eae4a7345d 100644 --- a/src/lib/statistics/counter.h +++ b/src/lib/statistics/counter.h @@ -22,13 +22,15 @@ #include <vector> +#include <stdint.h> + namespace isc { namespace statistics { class Counter : boost::noncopyable { public: typedef unsigned int Type; - typedef unsigned int Value; + typedef uint64_t Value; private: std::vector<Counter::Value> counters_; |