From f331f9975e8d90a8c430ee7c739c4c3ed8bbb1ec Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 18 May 2009 14:42:39 +0200 Subject: [PATCH] rrdtool plugin: Make sure the initialization is run only once. Thanks to Amit Gupta for reporting this bug! --- src/rrdtool.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rrdtool.c b/src/rrdtool.c index bbebc375..a205ef2c 100644 --- 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) -- 2.11.0