From: Timo Sirainen Date: Sun, 28 Feb 2016 17:55:53 +0000 (+0200) Subject: lib-ssl-iostream: If verbose=TRUE, internally log all errors. X-Git-Tag: 2.2.22.rc1~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb999a76f51081a4c5d7f7ac411de3fe6cff6c15;p=thirdparty%2Fdovecot%2Fcore.git lib-ssl-iostream: If verbose=TRUE, internally log all errors. --- diff --git a/src/lib-ssl-iostream/iostream-openssl.c b/src/lib-ssl-iostream/iostream-openssl.c index 5e61bcae40..54b06c0899 100644 --- a/src/lib-ssl-iostream/iostream-openssl.c +++ b/src/lib-ssl-iostream/iostream-openssl.c @@ -12,6 +12,12 @@ static void openssl_iostream_free(struct ssl_iostream *ssl_io); static void openssl_iostream_set_error(struct ssl_iostream *ssl_io, const char *str) { + if (ssl_io->verbose) { + /* This error should normally be logged by lib-ssl-iostream's + caller. But if verbose=TRUE, log it here as well to make + sure that the error is always logged. */ + i_debug("%sSSL error: %s", ssl_io->log_prefix, str); + } i_free(ssl_io->last_error); ssl_io->last_error = i_strdup(str); }