X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrdtool.c;h=243a8c8ff90feff941e5d20e179f63ef2e15f815;hb=bf90793e82989b1c36fe8f3b66b9c9fe05c9532d;hp=19f351abc3dc17329676ea77a193b635bc07d693;hpb=6a69db4d304118e11fd4bae9c761fc14674e4942;p=collectd.git diff --git a/src/rrdtool.c b/src/rrdtool.c index 19f351ab..243a8c8f 100644 --- a/src/rrdtool.c +++ b/src/rrdtool.c @@ -283,6 +283,9 @@ static void *rrd_queue_thread (void __attribute__((unused)) *data) int status; int i; + values = NULL; + values_num = 0; + pthread_mutex_lock (&queue_lock); /* Wait for values to arrive */ while (true) @@ -598,7 +601,7 @@ static int rrd_cache_flush_identifier (int timeout, const char *identifier) status = c_avl_get (cache, key, (void *) &rc); if (status != 0) { - WARNING ("rrdtool plugin: rrd_cache_flush_identifier: " + INFO ("rrdtool plugin: rrd_cache_flush_identifier: " "c_avl_get (%s) failed. Does that file really exist?", key); return (status); @@ -1022,8 +1025,13 @@ static int rrd_shutdown (void) static int rrd_init (void) { + static int init_once = 0; int status; + if (init_once != 0) + return (0); + init_once = 1; + if (rrdcreate_config.stepsize < 0) rrdcreate_config.stepsize = 0; if (rrdcreate_config.heartbeat <= 0)