projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tree wide: Don't set vl.host to hostname_g in plugin code.
[collectd.git]
/
src
/
openldap.c
diff --git
a/src/openldap.c
b/src/openldap.c
index
dd3226d
..
d5e58b1
100644
(file)
--- 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;
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));
sstrncpy (vl.host, st->host, sizeof (vl.host));
sstrncpy (vl.plugin, "openldap", sizeof (vl.plugin));