[rrd-developers] OP_COUNT fix

Jake Brutlag jakeb at microsoft.com
Tue Jul 15 03:03:39 MEST 2003


OP_COUNT was added to the rrd_rpncalc.h in Apr. Unfortunately, it was
added before OP_END, which caused a crash accessing some my data files
with previously defined computed data sources. I just checked in a fix
to move OP_COUNT to the end of the enumeration.

I would ask developers to note this comment that appears in
rrd_rpncalc.h when adding new operators. 

/* WARNING: if new operators are added, they MUST be added after OP_END.
 * This is because COMPUTE (CDEF) DS store OP nodes by number (name is
not
 * an option due to limited par array size). OP nodes must have the same
 * numeric values, otherwise the stored numbers will mean something
different. */

I don't anticipate this causing any problems for users of OP_COUNT, but
please let me if it does. It does mean that those RRD files created with
computed data sources after OP_COUNT was added (but before this fix)
will now have incompatible files. But this was in the code for only a
few months and computed data sources have been in the code base for a
year and half.

Jake Brutlag
Network Analyst
Microsoft MSN 

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list