X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fwrite_http.c;h=eee5a1c66c9837bdf7165f61be09203f6f5b1c88;hb=103f05e098865196fc5f28df51e99b64fd6b5202;hp=6dc7b364db537216cec0284852f03df46cb5d963;hpb=41f95c32f9e2c7dd36af832a729f52dfafb9c18f;p=collectd.git diff --git a/src/write_http.c b/src/write_http.c index 6dc7b364..eee5a1c6 100644 --- a/src/write_http.c +++ b/src/write_http.c @@ -18,7 +18,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * Authors: - * Florian octo Forster + * Florian octo Forster * Doug MacEachern * Paul Sadauskas **/ @@ -601,9 +601,18 @@ static int wh_config (oconfig_item_t *ci) /* {{{ */ return (0); } /* }}} int wh_config */ +static int wh_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 wh_init */ + void module_register (void) /* {{{ */ { plugin_register_complex_config ("write_http", wh_config); + plugin_register_init ("write_http", wh_init); } /* }}} void module_register */ /* vim: set fdm=marker sw=8 ts=8 tw=78 et : */