X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fwrite_http.c;h=34ea46d9db140761669a05e5db7248eed991d1f1;hp=7f5943a2435f1f7c9dafa9221433dd2ef92f4e41;hb=96e0f2341bace029acefe0a88bab96ae326c0ff5;hpb=c6a433718fa3bc3b6192153fee23558ddf011838 diff --git a/src/write_http.c b/src/write_http.c index 7f5943a2..34ea46d9 100644 --- a/src/write_http.c +++ b/src/write_http.c @@ -590,9 +590,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 : */