hessu / aprsc

aprsc, a core APRS-IS server
125 stars 40 forks source link

32-bit counters are not enough for packet bytes.. #19

Closed oh2mqk closed 12 years ago

oh2mqk commented 12 years ago

Aprsc status page on full-feed connection shows negative counts after about 10 days.

hessu commented 12 years ago

Fixed in SHA: 48af20034fc187ad7b5822c950221f5aea838518 for the version following 1.7.2. cJSON uses a 32-bit int as the integer type when loading numbers from JSON, as an alternative a double-precision float is available. I switched to using the parsed double value when grabbing byte and packet counters from the state JSON in a live upgrade.

The actual port accounters (by yourself) are 64-bit long longs.