From: Florian Forster Date: Sat, 27 Nov 2010 10:46:11 +0000 (+0100) Subject: Merge branch 'collectd-4.10' X-Git-Tag: collectd-5.0.0-beta0~12 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=853b3da5d4c6614d7db4093f57b1ca4f57b6c485;p=collectd.git Merge branch 'collectd-4.10' Conflicts: src/utils_rrdcreate.c --- 853b3da5d4c6614d7db4093f57b1ca4f57b6c485 diff --cc src/utils_rrdcreate.c index 7a389f26,66bb27e7..ce6443b7 --- a/src/utils_rrdcreate.c +++ b/src/utils_rrdcreate.c @@@ -405,19 -398,9 +405,19 @@@ int cu_rrd_create_file (const char *fil memcpy (argv + ds_num, rra_def, rra_num * sizeof (char *)); argv[ds_num + rra_num] = NULL; - if (vl->time == 0) - last_up = time (NULL) - 10; - else - last_up = CDTIME_T_TO_TIME_T (vl->time) - 10; ++ last_up = CDTIME_T_TO_TIME_T (vl->time); ++ if (last_up <= 10) ++ last_up = time (NULL); ++ last_up -= 10; + + if (cfg->stepsize > 0) + stepsize = cfg->stepsize; + else + stepsize = (int) CDTIME_T_TO_TIME_T (vl->interval); + - assert (vl->time > 10); status = srrd_create (filename, - stepsize, last_up, + (cfg->stepsize > 0) ? cfg->stepsize : vl->interval, - (vl->time > 10) ? (vl->time - 10) : vl->time, ++ last_up, argc, (const char **) argv); free (argv);