diff --git a/src/utils_rrdcreate.c b/src/utils_rrdcreate.c
index ce6443b7e5a47300e72fae2b2bb81d729ac3db41..091b5fa6dce1d2cc3bc48bb093298f39e5d0af46 100644 (file)
--- a/src/utils_rrdcreate.c
+++ b/src/utils_rrdcreate.c
if (rra_num >= rra_max)
break;
- status = ssnprintf (buffer, sizeof (buffer), "RRA:%s:%3.1f:%u:%u",
+ status = ssnprintf (buffer, sizeof (buffer), "RRA:%s:%.10f:%u:%u",
rra_types[j], cfg->xff, cdp_len, cdp_num);
if ((status < 0) || ((size_t) status >= sizeof (buffer)))
int ds_num;
int status = 0;
time_t last_up;
- int stepsize;
+ unsigned long stepsize;
if (check_create_dir (filename))
return (-1);
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;
else
- stepsize = (int) CDTIME_T_TO_TIME_T (vl->interval);
+ stepsize = (unsigned long) CDTIME_T_TO_TIME_T (vl->interval);
- status = srrd_create (filename,
- (cfg->stepsize > 0) ? cfg->stepsize : vl->interval,
- last_up,
+ status = srrd_create (filename, stepsize, last_up,
argc, (const char **) argv);
free (argv);