projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libvirt plugin: Further improve the connection handling.
[collectd.git]
/
src
/
rrdtool.c
diff --git
a/src/rrdtool.c
b/src/rrdtool.c
index
b80e110
..
ef1b25c
100644
(file)
--- a/
src/rrdtool.c
+++ b/
src/rrdtool.c
@@
-282,6
+282,9
@@
static void *rrd_queue_thread (void __attribute__((unused)) *data)
int status;
int i;
int status;
int i;
+ values = NULL;
+ values_num = 0;
+
pthread_mutex_lock (&queue_lock);
/* Wait for values to arrive */
while (true)
pthread_mutex_lock (&queue_lock);
/* Wait for values to arrive */
while (true)
@@
-596,7
+599,7
@@
static int rrd_cache_flush_identifier (int timeout, const char *identifier)
status = c_avl_get (cache, key, (void *) &rc);
if (status != 0)
{
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);
"c_avl_get (%s) failed. Does that file really exist?",
key);
return (status);
@@
-1004,8
+1007,13
@@
static int rrd_shutdown (void)
static int rrd_init (void)
{
static int rrd_init (void)
{
+ static int init_once = 0;
int status;
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)
if (rrdcreate_config.stepsize < 0)
rrdcreate_config.stepsize = 0;
if (rrdcreate_config.heartbeat <= 0)