diff --git a/src/rrd_client.c b/src/rrd_client.c
index 11c1e3357b08d18ea35140469ff82dcda53afd85..608eb8810113180b7cc409c711a498b8cb47189e 100644 (file)
--- a/src/rrd_client.c
+++ b/src/rrd_client.c
* but it is not specified in the current command.
* Daemon is only implied in this case if set in ENV
*/
- if (getenv(ENV_RRDCACHED_ADDRESS) != NULL)
+ char *addr = getenv(ENV_RRDCACHED_ADDRESS);
+ if (addr != NULL && strcmp(addr,"") != 0)
return 1;
else
return 0;
addr = getenv (ENV_RRDCACHED_ADDRESS);
}
- if (addr == NULL || ! strcmp(addr,"") ) {
+ if (addr == NULL || strcmp(addr,"") == 0 ) {
addr = NULL;
return 0;
}
response_free (res);
if (head == NULL)
+#ifdef EPROTO
return (EPROTO);
+#else
+ return (EINVAL);
+#endif
*ret_stats = head;
return (0);