From: Fabian Keil Date: Sat, 3 Oct 2020 15:33:26 +0000 (+0200) Subject: MbedTLS ssl_recv_data(): Include the socket in the log messages X-Git-Tag: v_3_0_29~54 X-Git-Url: http://www.privoxy.org/gitweb/user-manual/%244?a=commitdiff_plain;h=0eda78ade3c57a30851da2731f5912efdf620498;p=privoxy.git MbedTLS ssl_recv_data(): Include the socket in the log messages --- diff --git a/ssl.c b/ssl.c index bc4c5af4..729388f1 100644 --- a/ssl.c +++ b/ssl.c @@ -235,18 +235,21 @@ extern int ssl_recv_data(struct ssl_attr *ssl_attr, unsigned char *buf, size_t m if (ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) { - log_error(LOG_LEVEL_CONNECT, - "The peer notified us that the connection is going to be closed"); + log_error(LOG_LEVEL_CONNECT, "The peer notified us that " + "the connection on socket %d is going to be closed", + ssl_attr->mbedtls_attr.socket_fd.fd); return 0; } mbedtls_strerror(ret, err_buf, sizeof(err_buf)); log_error(LOG_LEVEL_ERROR, - "Receiving data over TLS/SSL failed: %s", err_buf); + "Receiving data on socket %d over TLS/SSL failed: %s", + ssl_attr->mbedtls_attr.socket_fd.fd, err_buf); return -1; } - log_error(LOG_LEVEL_RECEIVED, "TLS: %N", ret, buf); + log_error(LOG_LEVEL_RECEIVED, "TLS from socket %d: %N", + ssl_attr->mbedtls_attr.socket_fd.fd, ret, buf); return ret; }