From: Marc Fournier Date: Wed, 14 Oct 2015 16:13:31 +0000 (+0200) Subject: openldap: set the default timeout to the plugin read `Interval` X-Git-Tag: collectd-5.6.0~300^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b0c62e049036a8da35b4821a60935826e9afebca;p=collectd.git openldap: set the default timeout to the plugin read `Interval` --- 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;