X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Frrdcached.c;h=3db89b5e6b2d7336788fdb3c06f69e464367abf4;hb=f2f7049e8faff8043b12d7c7548d9398d3b3ada4;hp=07eac7b67c1672a6b1da902a03d0c983d1fe2b41;hpb=e14e8b7f5c5bf9d0fe5cc632c6383f304d4ac2ad;p=collectd.git diff --git a/src/rrdcached.c b/src/rrdcached.c index 07eac7b6..3db89b5e 100644 --- a/src/rrdcached.c +++ b/src/rrdcached.c @@ -302,10 +302,8 @@ static int rc_read (void) if (!config_collect_stats) return (-1); - if ((strncmp ("unix:", daemon_address, strlen ("unix:")) == 0) - || (daemon_address[0] == '/')) - sstrncpy (vl.host, hostname_g, sizeof (vl.host)); - else + if ((strncmp ("unix:", daemon_address, strlen ("unix:")) != 0) + && (daemon_address[0] != '/')) sstrncpy (vl.host, daemon_address, sizeof (vl.host)); sstrncpy (vl.plugin, "rrdcached", sizeof (vl.plugin));