diff src/lib-dcrypt/test-crypto.c @ 21482:d7227df3624d

lib-dcrypt: If dcrypt can't be initialized, log also the reason. This is very helpful when debugging linking issues.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Sun, 05 Feb 2017 20:20:37 +0200
parents 2e2563132d5f
children cb108f786fb4
line wrap: on
line diff
--- a/src/lib-dcrypt/test-crypto.c	Sun Feb 05 21:38:33 2017 +0200
+++ b/src/lib-dcrypt/test-crypto.c	Sun Feb 05 20:20:37 2017 +0200
@@ -755,10 +755,11 @@
 	struct dcrypt_settings set = {
 		.module_dir = ".libs"
 	};
+	const char *error;
 
 	random_init();
-	if (!dcrypt_initialize(NULL, &set, NULL)) {
-		i_error("No functional dcrypt backend found - skipping tests");
+	if (!dcrypt_initialize(NULL, &set, &error)) {
+		i_error("No functional dcrypt backend found - skipping tests: %s", error);
 		return 0;
 	}