Browse Source

[3016] Counter::Value is changed to uint64_t and auth outputs 63bit of values

Kazunori Fujiwara 12 years ago
parent
commit
3506d24450
2 changed files with 7 additions and 3 deletions
  1. 4 2
      src/bin/auth/statistics.cc.pre
  2. 3 1
      src/lib/statistics/counter.h

+ 4 - 2
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))
                        );
         }
     }

+ 3 - 1
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_;