diff --git a/src/rrdtool.c b/src/rrdtool.c
index b366a9c64166eeeae135f700b069e81578cac28a..b1d13ee3c19ee279c836741739b521359872c63b 100644 (file)
--- a/src/rrdtool.c
+++ b/src/rrdtool.c
if (status != 0)
{
WARNING ("rrdtool plugin: rrd_update_r failed: %s: %s",
- argv[1], rrd_get_error ());
+ filename, rrd_get_error ());
}
sfree (new_argv);
}
else if (strcasecmp ("StepSize", key) == 0)
{
- int temp = atoi (value);
+ unsigned long temp = strtoul (value, NULL, 0);
if (temp > 0)
rrdcreate_config.stepsize = temp;
}
return (0);
init_once = 1;
- if (rrdcreate_config.stepsize < 0)
- rrdcreate_config.stepsize = 0;
if (rrdcreate_config.heartbeat <= 0)
rrdcreate_config.heartbeat = 2 * rrdcreate_config.stepsize;
- if ((rrdcreate_config.heartbeat > 0)
- && (rrdcreate_config.heartbeat < CDTIME_T_TO_TIME_T (interval_g)))
- WARNING ("rrdtool plugin: Your `heartbeat' is "
- "smaller than your `interval'. This will "
- "likely cause problems.");
- else if ((rrdcreate_config.stepsize > 0)
- && (rrdcreate_config.stepsize < CDTIME_T_TO_TIME_T (interval_g)))
- WARNING ("rrdtool plugin: Your `stepsize' is "
- "smaller than your `interval'. This will "
- "create needlessly big RRD-files.");
-
/* Set the cache up */
pthread_mutex_lock (&cache_lock);
pthread_mutex_unlock (&cache_lock);
- status = pthread_create (&queue_thread, /* attr = */ NULL,
+ status = plugin_thread_create (&queue_thread, /* attr = */ NULL,
rrd_queue_thread, /* args = */ NULL);
if (status != 0)
{
}
queue_thread_running = 1;
- DEBUG ("rrdtool plugin: rrd_init: datadir = %s; stepsize = %i;"
+ DEBUG ("rrdtool plugin: rrd_init: datadir = %s; stepsize = %lu;"
" heartbeat = %i; rrarows = %i; xff = %lf;",
(datadir == NULL) ? "(null)" : datadir,
rrdcreate_config.stepsize,