commit 858efc3: [Minor] Ssl: Improve logging
Vsevolod Stakhov
vsevolod at highsecure.ru
Sun Nov 3 09:49:08 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-11-03 09:47:25 +0000
URL: https://github.com/rspamd/rspamd/commit/858efc353dfabf470e52b051cbccb8d46badd2d8 (HEAD -> master)
[Minor] Ssl: Improve logging
---
src/libutil/ssl_util.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/libutil/ssl_util.c b/src/libutil/ssl_util.c
index e7bd33be9..f4fe3b31c 100644
--- a/src/libutil/ssl_util.c
+++ b/src/libutil/ssl_util.c
@@ -456,7 +456,11 @@ rspamd_ssl_shutdown (struct rspamd_ssl_connection *conn)
}
else {
/* Cannot do anything else, fatal error */
- msg_debug_ssl ("ssl shutdown: fatal error");
+ GError *err = NULL;
+
+ rspamd_tls_set_error (ret, "final shutdown", &err);
+ msg_debug_ssl ("ssl shutdown: fatal error: %e", err);
+ g_error_free (err);
rspamd_ssl_connection_dtor (conn);
return;
@@ -652,8 +656,13 @@ rspamd_ssl_connect_fd (struct rspamd_ssl_connection *conn, gint fd,
msg_debug_ssl ("not connected, want write");
}
else {
+ GError *err = NULL;
+
conn->shut = ssl_shut_unclean;
- msg_debug_ssl ("not connected, fatal error %d", ret);
+ rspamd_tls_set_error (ret, "initial connect", &err);
+ msg_debug_ssl ("not connected, fatal error %e", err);
+ g_error_free (err);
+
return FALSE;
}
More information about the Commits
mailing list