Hi, rrd_diff() does not produce correct result when 2 values are negative or have different signs. Some of the vendors (N*****k A*******e) have mibs where counter values can be negative. Also DERIVE datasource must work correctly even when both measurements are negative.
Attached small patch against latest stable rrdtool to rrd_diff.c fixes the case when 2 values are negative. Fixing the last case does not have much practical value. As a side question i wonder why not to convert function parameters to double using strtod() and then return the difference ? Sasha Mikheev Avalon Net Ltd, CTO +972-50-481787, +972-4-8210307 http://www.avalon-net.co.il -- Attached file removed by Ecartis and put at URL below -- -- Type: application/octet-stream -- Size: 1k (1456 bytes) -- URL : http://www.ee.ethz.ch/~slist/pantomime/rrd_diff.c.diff -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-developers WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
