From: Willy Tarreau Date: Mon, 11 Apr 2022 16:01:28 +0000 (+0200) Subject: MINOR: connection: use conn_fd() when displaying connection errors X-Git-Tag: v2.6-dev6~135 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e9c264ca04375beb9818052843d452baa03a9be;p=thirdparty%2Fhaproxy.git MINOR: connection: use conn_fd() when displaying connection errors The SSL connection errors and socks4 proxy errors used to blindly dump the FD, now it's sanitized via conn_fd(). --- diff --git a/src/connection.c b/src/connection.c index 2302fd9ecb..af453a6b86 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1404,7 +1404,7 @@ int conn_send_socks4_proxy_request(struct connection *conn) (conn->subs && conn->subs->events & SUB_RETRY_SEND) ? CO_SFL_MSG_MORE : 0); DPRINTF(stderr, "SOCKS PROXY HS FD[%04X]: Before send remain is [%d], sent [%d]\n", - conn->handle.fd, -conn->send_proxy_ofs, ret); + conn_fd(conn), -conn->send_proxy_ofs, ret); if (ret < 0) { goto out_error; diff --git a/src/ssl_sock.c b/src/ssl_sock.c index de0965dc8e..748ab13241 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -620,7 +620,7 @@ static forceinline void ssl_sock_dump_errors(struct connection *conn) if (ret == 0) return; fprintf(stderr, "fd[%#x] OpenSSL error[0x%lx] %s: %s\n", - conn->handle.fd, ret, + conn_fd(conn), ret, func, ERR_reason_error_string(ret)); } }