X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Frrd_hw.c;h=af224fd016717fbc6924cb6088caf671d41a9db6;hb=refs%2Fheads%2Fupstream-1.4;hp=e95fa082ae99243f15298eceaf1c599ecb64a55b;hpb=be3cca08c4031f46d4e2b872ab0eb825c5b69b4e;p=pkg-rrdtool.git diff --git a/src/rrd_hw.c b/src/rrd_hw.c index e95fa08..af224fd 100644 --- a/src/rrd_hw.c +++ b/src/rrd_hw.c @@ -1,20 +1,18 @@ /***************************************************************************** - * RRDtool 1.3.5 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3.2 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * 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" #include "rrd_hw_update.h" -#ifdef WIN32 -#include -#endif - #define hw_dep_idx(rrd, rra_idx) rrd->rra_def[rra_idx].par[RRA_dependent_rra_idx].u_cnt /* #define DEBUG */ @@ -168,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) { @@ -272,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) + @@ -295,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); @@ -310,7 +306,6 @@ int apply_smoother( return -1; } - rrd_flush(rrd_file); free(rrd_values); free(baseline); return 0;