projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c640e2c
)
openldap: initialize LDAP library before collectd goes multi-threaded
author
Marc Fournier
<marc.fournier@camptocamp.com>
Wed, 20 Aug 2014 08:13:14 +0000
(10:13 +0200)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Fri, 29 Aug 2014 13:09:55 +0000
(15:09 +0200)
src/openldap.c
patch
|
blob
|
history
diff --git
a/src/openldap.c
b/src/openldap.c
index
e6e1c64
..
9763a06
100644
(file)
--- a/
src/openldap.c
+++ b/
src/openldap.c
@@
-738,7
+738,18
@@
static int ldap_config (oconfig_item_t *ci) /* {{{ */
/* }}} End of configuration handling functions */
/* }}} End of configuration handling functions */
+static int ldap_init (void) /* {{{ */
+{
+ /* Initialize LDAP library while still single-threaded as recommended in
+ * ldap_initialize(3) */
+ int debug_level;
+ ldap_get_option(NULL, LDAP_OPT_DEBUG_LEVEL, &debug_level);
+ return (0);
+
+} /* }}} int ldap_init */
+
void module_register (void) /* {{{ */
{
plugin_register_complex_config ("openldap", ldap_config);
void module_register (void) /* {{{ */
{
plugin_register_complex_config ("openldap", ldap_config);
+ plugin_register_init ("openldap", ldap_init);
} /* }}} void module_register */
} /* }}} void module_register */