dovecot-2.2: lib-http: If SSL connection gets lost, log the last...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Mar 10 18:37:58 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/0eaa4fddd61d
changeset: 16009:0eaa4fddd61d
user: Timo Sirainen <tss at iki.fi>
date: Sun Mar 10 18:37:46 2013 +0200
description:
lib-http: If SSL connection gets lost, log the last SSL error.
diffstat:
src/lib-http/http-client-connection.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diffs (20 lines):
diff -r 1a5414423958 -r 0eaa4fddd61d src/lib-http/http-client-connection.c
--- a/src/lib-http/http-client-connection.c Sun Mar 10 18:37:10 2013 +0200
+++ b/src/lib-http/http-client-connection.c Sun Mar 10 18:37:46 2013 +0200
@@ -117,6 +117,16 @@
unsigned int status, const char *error)
{
struct http_client_connection *conn = *_conn;
+ const char *sslerr;
+
+ if (status == HTTP_CLIENT_REQUEST_ERROR_CONNECTION_LOST &&
+ conn->ssl_iostream != NULL) {
+ sslerr = ssl_iostream_get_last_error(conn->ssl_iostream);
+ if (sslerr != NULL) {
+ error = t_strdup_printf("%s (last SSL error: %s)",
+ error, sslerr);
+ }
+ }
conn->connected = FALSE;
conn->closing = TRUE;
More information about the dovecot-cvs
mailing list