projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
network plugin: Fix initialization of the gcrypt library.
[collectd.git]
/
src
/
network.c
diff --git
a/src/network.c
b/src/network.c
index
0e246c2
..
791c199
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-51,6
+51,7
@@
#if HAVE_LIBGCRYPT
# include <gcrypt.h>
#if HAVE_LIBGCRYPT
# include <gcrypt.h>
+GCRY_THREAD_OPTION_PTHREAD_IMPL;
#endif
/* 1500 - 40 - 8 = Ethernet packet - IPv6 header - UDP header */
#endif
/* 1500 - 40 - 8 = Ethernet packet - IPv6 header - UDP header */
@@
-3028,6
+3029,12
@@
static int network_flush (int timeout,
void module_register (void)
{
void module_register (void)
{
+#if HAVE_LIBGCRYPT
+ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
+ gcry_control (GCRYCTL_INIT_SECMEM, 32768, 0);
+ gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+#endif
+
plugin_register_complex_config ("network", network_config);
plugin_register_init ("network", network_init);
plugin_register_flush ("network", network_flush,
plugin_register_complex_config ("network", network_config);
plugin_register_init ("network", network_init);
plugin_register_flush ("network", network_flush,