Code

network plugin: Initialize libgcrypt only when needed.
authorFlorian Forster <octo@collectd.org>
Fri, 2 Sep 2016 07:00:58 +0000 (09:00 +0200)
committerFlorian Forster <octo@collectd.org>
Fri, 2 Sep 2016 07:01:00 +0000 (09:01 +0200)
commit22b9f5441f0bb294e16aa27169d02eb69e32d556
treef5c018686c348b6506ead8237d2f68a22de2edc8
parent356901a4a8df5d6f40f9d03d2276d66fe9e13d17
network plugin: Initialize libgcrypt only when needed.

Previously, libgcrypt was initialized unconditionally in network_init(),
which may cause trouble on some systems. With this patch, gcrypt is
initialized if:

* A client socket as signing or encryption enabled, or
* a server socket has an auth_file configured.

Fixes: #1902
src/network.c