Mercurial > dovecot > original-hg > dovecot-1.2
diff src/login-common/client-common.c @ 7374:0bb3fc72a74f HEAD
If TLS connection closes with anything except a clean disconnection, log the
reason in the normal disconnected line.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 08 Mar 2008 02:09:40 +0200 |
parents | e6693a0ec8e1 |
children | 3644883cf44e |
line wrap: on
line diff
--- a/src/login-common/client-common.c Fri Mar 07 14:25:06 2008 +0200 +++ b/src/login-common/client-common.c Sat Mar 08 02:09:40 2008 +0200 @@ -78,9 +78,12 @@ if (!client->tls) { tab[11].value = client->secured ? "secured" : NULL; } else { - tab[11].value = client->proxy != NULL && - ssl_proxy_is_handshaked(client->proxy) ? "TLS" : - "TLS handshaking"; + const char *ssl_state = ssl_proxy_is_handshaked(client->proxy) ? + "TLS" : "TLS handshaking"; + const char *ssl_error = ssl_proxy_get_last_error(client->proxy); + + tab[11].value = ssl_error == NULL ? ssl_state : + t_strdup_printf("%s: %s", ssl_state, ssl_error); } return tab;