From 3213b1719f061a7846e5607dbd76cd007af687ed Mon Sep 17 00:00:00 2001 From: oetiker Date: Fri, 16 Sep 2011 13:04:31 +0000 Subject: [PATCH] handling of ENV_RRDCACHED_ADDRESS: added missing brackets after if, backported fix from trunk to 1.4 while doing it -- patch by x @ zamyteam.org git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4@2199 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_client.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/program/src/rrd_client.c b/program/src/rrd_client.c index bbc1c490..11c1e335 100644 --- a/program/src/rrd_client.c +++ b/program/src/rrd_client.c @@ -511,11 +511,14 @@ int rrdc_connect (const char *addr) /* {{{ */ { int status = 0; - if (addr == NULL) + if (addr == NULL) { addr = getenv (ENV_RRDCACHED_ADDRESS); + } - if (addr == NULL) - return 0; + if (addr == NULL || ! strcmp(addr,"") ) { + addr = NULL; + return 0; + } pthread_mutex_lock(&lock); -- 2.30.2