From: Florian Forster Date: Mon, 2 Jul 2012 15:55:24 +0000 (-0400) Subject: src/common.c: rate_to_value: Update last_time and fix type of delta_gauge. X-Git-Tag: collectd-5.2.0~24^2~6 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0f9ab9f26f7f164d8663096843c262bd918eb3ff;p=collectd.git src/common.c: rate_to_value: Update last_time and fix type of delta_gauge. --- diff --git a/src/common.c b/src/common.c index 4ca58d55..9098de59 100644 --- a/src/common.c +++ b/src/common.c @@ -1236,7 +1236,7 @@ int rate_to_value (value_t *ret_value, gauge_t rate, /* {{{ */ rate_to_value_state_t *state, int ds_type, cdtime_t t) { - derive_t delta_gauge; + gauge_t delta_gauge; cdtime_t delta_t; if (ds_type == DS_TYPE_GAUGE) @@ -1322,6 +1322,7 @@ int rate_to_value (value_t *ret_value, gauge_t rate, /* {{{ */ assert (23 == 42); } + state->last_time = t; *ret_value = state->last_value; return (0); } /* }}} value_t rate_to_value */