X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fwrite_http.c;h=34ea46d9db140761669a05e5db7248eed991d1f1;hb=96e0f2341bace029acefe0a88bab96ae326c0ff5;hp=7f5943a2435f1f7c9dafa9221433dd2ef92f4e41;hpb=7a762196fa7a4024c19ceac9b0c6918a5d8f62d5;p=collectd.git 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 : */