oetiker/rrdtool-1.x — pull request #551 by oetiker (2014-10-29 13:47:49+00:00)
Title: fix hw smoothing

Working average has value at position k added. MyMod ensures k wraps around
to beginning when in excess of row_count. But when wrapping around the
first (#=offset) entries are already updated so you are smoothing later
values using pre-smoothed values. This is effectively double weighting some
values and diluting the last (#=offset) values smoothed since they are
getting some effect from outside their expected smoothing window.

This patch fixes the problem by first makeing a copy of the rrd_values.