/**
* collectd - src/network.c
* Copyright (C) 2005-2009 Florian octo Forster
+ * Copyright (C) 2009 Aman Gupta
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
*
* Authors:
* Florian octo Forster <octo at verplant.org>
+ * Aman Gupta <aman at tmm1.net>
**/
#define _BSD_SOURCE /* For struct ip_mreq */
#if HAVE_LIBGCRYPT
# include <gcrypt.h>
+GCRY_THREAD_OPTION_PTHREAD_IMPL;
#endif
#ifndef IPV6_ADD_MEMBERSHIP
return (0);
have_init = true;
+#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_shutdown ("network", network_shutdown);
send_buffer = malloc (network_config_packet_size);