From df69b00d717b3a4c6c0c8b9a968516c444d2664c Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sat, 28 Jan 2006 19:54:54 +0000 Subject: Clean up our value storage. --- daemon/rrdbotd.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'daemon/rrdbotd.h') diff --git a/daemon/rrdbotd.h b/daemon/rrdbotd.h index b211007..0b7b0e1 100644 --- a/daemon/rrdbotd.h +++ b/daemon/rrdbotd.h @@ -39,7 +39,6 @@ #ifndef __RRDBOTD_H__ #define __RRDBOTD_H__ -#include #include #include @@ -53,7 +52,6 @@ */ typedef uint64_t mstime; -#define RB_UNKNOWN -DBL_MAX struct _rb_item; struct _rb_poller; @@ -67,14 +65,23 @@ struct _rb_request; typedef struct _rb_item { - struct _rb_request* req; - /* Specific to this item */ const char* rrdfield; struct snmp_value snmpfield; /* The last value / current request */ - double value; + union + { + int64_t i_value; + double f_value; + } v; + + #define VALUE_UNSET 0 + #define VALUE_REAL 1 + #define VALUE_FLOAT 2 + int vtype; + + struct _rb_request* req; /* Pointers to related */ const struct _rb_poller* poller; -- cgit v1.2.3