projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b235b6a
)
rrdtool plugin: Make sure the initialization is run only once.
author
Florian Forster
<octo@huhu.verplant.org>
Mon, 18 May 2009 12:42:39 +0000
(14:42 +0200)
committer
Florian Forster
<octo@huhu.verplant.org>
Mon, 18 May 2009 12:42:39 +0000
(14:42 +0200)
Thanks to Amit Gupta for reporting this bug!
src/rrdtool.c
patch
|
blob
|
history
diff --git
a/src/rrdtool.c
b/src/rrdtool.c
index
bbebc37
..
a205ef2
100644
(file)
--- a/
src/rrdtool.c
+++ b/
src/rrdtool.c
@@
-1007,8
+1007,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)