summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6f34350)
raw | patch | inline | side by side (parent: 6f34350)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 16 Oct 2015 09:29:37 +0000 (11:29 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 16 Oct 2015 09:53:54 +0000 (11:53 +0200) |
src/openldap.c | patch | blob | history |
diff --git a/src/openldap.c b/src/openldap.c
index 0c88f8cca0a166865fc86e2c6836a2384fa5ec8c..dc93334458c5fc46e95fc1b7406cfd1bbc27ec21 100644 (file)
--- a/src/openldap.c
+++ b/src/openldap.c
/**
* collectd - src/openldap.c
* Copyright (C) 2011 Kimo Rosenbaum
- * Copyright (C) 2014 Marc Fournier
+ * Copyright (C) 2014-2015 Marc Fournier
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
cred.bv_len = 0;
}
- rc = ldap_sasl_bind_s (st->ld, st->binddn, LDAP_SASL_SIMPLE, &cred,
+ rc = ldap_sasl_bind_s (st->ld, st->binddn, LDAP_SASL_SIMPLE, &cred,
NULL, NULL, NULL);
if (rc != LDAP_SUCCESS)
{
@@ -167,13 +167,9 @@ static void cldap_submit_value (const char *type, const char *type_instance, /*
if ((st->host == NULL)
|| (strcmp ("", st->host) == 0)
|| (strcmp ("localhost", st->host) == 0))
- {
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
- }
else
- {
sstrncpy (vl.host, st->host, sizeof (vl.host));
- }
sstrncpy (vl.plugin, "openldap", sizeof (vl.plugin));
if (st->name != NULL)
}
if ((status == 0) && (ludpp->lud_host != NULL))
- {
st->host = strdup (ludpp->lud_host);
- }
ldap_free_urldesc (ludpp);
}