network plugin: Change the license to LGPL 2.1.
[collectd.git] / src / network.c
index 791c199..a009551 100644 (file)
@@ -3,17 +3,18 @@
  * Copyright (C) 2005-2009  Florian octo Forster
  *
  * 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
- * Free Software Foundation; only version 2 of the License is applicable.
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; only version 2.1 of the License is
+ * applicable.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
  * Authors:
  *   Florian octo Forster <octo at verplant.org>
@@ -2938,6 +2939,12 @@ static int network_init (void)
        if (cache_flush_last != 0)
                return (0);
 
+#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);
 
        network_init_buffer ();
@@ -3029,12 +3036,6 @@ static int network_flush (int timeout,
 
 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,