summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ddffda7)
raw | patch | inline | side by side (parent: ddffda7)
author | Florian Forster <octo@collectd.org> | |
Wed, 15 Jan 2014 22:47:33 +0000 (23:47 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 15 Jan 2014 22:47:33 +0000 (23:47 +0100) |
This is a shot in the dark in trying to address #513. By calling this
from an init() callback, I hope to be initializing the curl and gcrypt
libraries before collectd becomes multi-threaded, avoiding the problems
described in the issue.
from an init() callback, I hope to be initializing the curl and gcrypt
libraries before collectd becomes multi-threaded, avoiding the problems
described in the issue.
src/apache.c | patch | blob | history |
diff --git a/src/apache.c b/src/apache.c
index 899c21ee450b39af65247012c7416bc1914c7932..23bba3ea6561e958c4f616fcf78e1aef9f7304cc 100644 (file)
--- a/src/apache.c
+++ b/src/apache.c
return (0);
} /* }}} int apache_read_host */
+static int apache_init (void) /* {{{ */
+{
+ /* Call this while collectd is still single-threaded to avoid
+ * initialization issues in libgcrypt. */
+ curl_global_init (CURL_GLOBAL_SSL);
+ return (0);
+} /* }}} int apache_init */
+
void module_register (void)
{
plugin_register_complex_config ("apache", config);
+ plugin_register_init ("apache", apache_init);
} /* void module_register */
/* vim: set sw=8 noet fdm=marker : */