From b0c62e049036a8da35b4821a60935826e9afebca Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Wed, 14 Oct 2015 18:13:31 +0200 Subject: [PATCH] openldap: set the default timeout to the plugin read `Interval` --- src/collectd.conf.pod | 5 +++-- src/openldap.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 59247da0..48de6f90 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -4660,8 +4660,9 @@ client configuration mechanisms. See ldap.conf(5) for the details. =item B I -Sets the timeout value for ldap operations. Defaults to B<-1> which results in -an infinite timeout. +Sets the timeout value for ldap operations, in seconds. By default, the +configured B is used to set the timeout. Use B<-1> to disable +(infinite timeout). =item B I diff --git a/src/openldap.c b/src/openldap.c index 1ef9f7b9..dacb7192 100644 --- a/src/openldap.c +++ b/src/openldap.c @@ -571,7 +571,7 @@ static int cldap_config_add (oconfig_item_t *ci) /* {{{ */ } st->starttls = 0; - st->timeout = -1; + st->timeout = (long) (CDTIME_T_TO_MS(plugin_get_interval()) / 1000); st->verifyhost = 1; st->version = LDAP_VERSION3; -- 2.11.0