Show
Ignore:
Timestamp:
11/15/08 23:24:17 (21 months ago)
Author:
ahu
Message:

make statbag work with unsigned counters - people are complaining of wraparounds at 2.15 billion packets going wrong! closes ticket 179, thanks Stefan Schmidt

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/statbag.hh

    r681 r1284  
    5959class StatBag 
    6060{ 
    61   map<string,int *> d_stats; 
     61  map<string, unsigned int *> d_stats; 
    6262  map<string, string> d_keyDescrips; 
    6363  map<string,StatRing>d_rings; 
     
    9797  int read(const string &key); //!< read the value behind this key 
    9898  int readZero(const string &key); //!< read the value behind this key, and zero it afterwards 
    99   int *getPointer(const string &key); //!< get a direct pointer to the value behind a key. Use this for high performance increments 
     99  unsigned int *getPointer(const string &key); //!< get a direct pointer to the value behind a key. Use this for high performance increments 
    100100  string getValueStr(const string &key); //!< read a value behind a key, and return it as a string 
    101101  string getValueStrZero(const string &key); //!< read a value behind a key, and return it as a string, and zero afterwards