X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fopenldap.c;h=d5e58b1a67d0f9b2295097a7b5705188b517b6dd;hb=8c5927c52f4eefebaad3a6ecadc253ee9007ebb5;hp=dd3226d3a193d1478d8f3ec8ce06b0226b01e9fb;hpb=e1bfa71aca1f37c2f293dc9adb44065c6e7a9ad9;p=collectd.git diff --git a/src/openldap.c b/src/openldap.c index dd3226d3..d5e58b1a 100644 --- a/src/openldap.c +++ b/src/openldap.c @@ -169,11 +169,7 @@ static void cldap_submit_value (const char *type, const char *type_instance, /* vl.values = &value; vl.values_len = 1; - if ((st->host == NULL) - || (strcmp ("", st->host) == 0) - || (strcmp ("localhost", st->host) == 0)) - sstrncpy (vl.host, hostname_g, sizeof (vl.host)); - else + if ((st->host != NULL) && (strcmp ("localhost", st->host) != 0)) sstrncpy (vl.host, st->host, sizeof (vl.host)); sstrncpy (vl.plugin, "openldap", sizeof (vl.plugin));