network plugin: Make sure gcrypt is initialized before using any of its functions.
authorFlorian Forster <octo@collectd.org>
Sat, 6 Apr 2013 16:23:16 +0000 (18:23 +0200)
committerFlorian Forster <octo@collectd.org>
Sat, 6 Apr 2013 16:27:59 +0000 (18:27 +0200)
commit0ec776abf45ef3989f38d966e74b588f9ef15ebe
tree8102e794e4ddcd98f054a186ad64da47b942109f
parent5680622ee9d70a9df30564a34e0cc01afcf0d05b
network plugin: Make sure gcrypt is initialized before using any of its functions.

@marekbecka found that sockent_open() is called during the configuration
phase, but gcrypt is initialized later, during the initialization phase.
This patch will initialize gcrypt in sockent_open() if any sockets with
security are configured.

Fixes Github issue #273.
src/network.c