X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Frrd_hw.c;h=4c2fae69f2b9d3aab4cbd687ee472e019b63d16a;hb=d9822df7ed5e8122cf3a62e4e99678e94007f504;hp=5010d9e3f0f838ab913e90f8ee840e43fd6c8d32;hpb=0b658ef9d0f5dd5c84288bd1307843d8f8f7060b;p=pkg-rrdtool.git diff --git a/src/rrd_hw.c b/src/rrd_hw.c index 5010d9e..4c2fae6 100644 --- a/src/rrd_hw.c +++ b/src/rrd_hw.c @@ -1,11 +1,13 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.4.8 Copyright by Tobi Oetiker, 1997-2013 ***************************************************************************** * rrd_hw.c : Support for Holt-Winters Smoothing/ Aberrant Behavior Detection ***************************************************************************** * Initial version by Jake Brutlag, WebTV Networks, 5/1/00 *****************************************************************************/ +#include + #include "rrd_tool.h" #include "rrd_hw.h" #include "rrd_hw_math.h" @@ -164,7 +166,7 @@ int apply_smoother( free(rrd_values); return -1; } - rrd_flush(rrd_file); + /* could read all data in a single block, but we need to * check for NA values */ for (i = 0; i < row_count; ++i) { @@ -268,7 +270,6 @@ int apply_smoother( baseline[j]; } /* flush cdp to disk */ - rrd_flush(rrd_file); if (rrd_seek(rrd_file, sizeof(stat_head_t) + rrd->stat_head->ds_cnt * sizeof(ds_def_t) + rrd->stat_head->rra_cnt * sizeof(rra_def_t) + @@ -291,7 +292,6 @@ int apply_smoother( /* endif CF_SEASONAL */ /* flush updated values to disk */ - rrd_flush(rrd_file); if (rrd_seek(rrd_file, rra_start, SEEK_SET)) { rrd_set_error("apply_smoother: seek to pos %d failed", rra_start); free(rrd_values); @@ -306,7 +306,6 @@ int apply_smoother( return -1; } - rrd_flush(rrd_file); free(rrd_values); free(baseline); return 0;