- if (im->use_rrdcached == 0)
- {
- char *temp;
-
- temp = getenv (ENV_RRDCACHED_ADDRESS);
- if (temp != NULL)
- {
- int status;
-
- status = rrdc_connect (temp);
- if (status != 0)
- {
- rrd_set_error ("rrdc_connect(%s) failed with status %i.",
- temp, status);
- return;
- }
- im->use_rrdcached = 1;
- }
+ { /* try to connect to rrdcached */
+ int status = rrdc_connect(im->daemon_addr);
+ if (status != 0) return;