]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dcrypt: If dcrypt can't be initialized, log also the reason.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 5 Feb 2017 18:20:37 +0000 (20:20 +0200)
committerGitLab <gitlab@git.dovecot.net>
Mon, 6 Feb 2017 08:16:49 +0000 (10:16 +0200)
This is very helpful when debugging linking issues.

src/lib-dcrypt/test-crypto.c
src/lib-dcrypt/test-stream.c

index eb76b5aaaf73e2bfd8356ecfbafcf68abc2efe37..40e290dc909855bcf68a60fef5c8fe587068f611 100644 (file)
@@ -755,10 +755,11 @@ int main(void) {
        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;
        }
 
index 99a5744bc50134af91d7b1f6da6097a153a92b3c..a39602cfcece7d21d07ddf6da07058cfdc30ffd0 100644 (file)
@@ -527,9 +527,10 @@ int main(void) {
        struct dcrypt_settings set = {
                .module_dir = ".libs"
        };
+       const char *error;
 
-       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;
        }
        random_init();