From: Florian Forster Date: Sat, 12 May 2012 15:29:44 +0000 (+0200) Subject: src/utils_rrdcreate.c: Handle "last update" in a saner way. X-Git-Tag: collectd-5.0.5~18 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c00718f5ae61eea67abdd92aa4cb65920d4803aa;p=collectd.git src/utils_rrdcreate.c: Handle "last update" in a saner way. --- diff --git a/src/utils_rrdcreate.c b/src/utils_rrdcreate.c index 91ac6ce5..091b5fa6 100644 --- a/src/utils_rrdcreate.c +++ b/src/utils_rrdcreate.c @@ -406,9 +406,9 @@ int cu_rrd_create_file (const char *filename, /* {{{ */ argv[ds_num + rra_num] = NULL; last_up = CDTIME_T_TO_TIME_T (vl->time); - if (last_up <= 10) + if (last_up <= 0) last_up = time (NULL); - last_up -= 10; + last_up -= 1; if (cfg->stepsize > 0) stepsize = cfg->stepsize;