From: Stephan Bosch Date: Fri, 8 Nov 2019 16:11:32 +0000 (+0100) Subject: lib-http: server: Remove redundant debug logging checks. X-Git-Tag: 2.3.11.2~330 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06f3dd3bd2967ba898c9485729f6dde06abc0341;p=thirdparty%2Fdovecot%2Fcore.git lib-http: server: Remove redundant debug logging checks. --- diff --git a/src/lib-http/http-server-connection.c b/src/lib-http/http-server-connection.c index ec394495cb..4982a4ee08 100644 --- a/src/lib-http/http-server-connection.c +++ b/src/lib-http/http-server-connection.c @@ -41,11 +41,9 @@ http_server_connection_debug(struct http_server_connection *conn, { va_list args; - if (conn->server->set.debug) { - va_start(args, format); - e_debug(conn->event, "%s", t_strdup_vprintf(format, args)); - va_end(args); - } + va_start(args, format); + e_debug(conn->event, "%s", t_strdup_vprintf(format, args)); + va_end(args); } static inline void @@ -420,8 +418,7 @@ http_server_connection_ssl_init(struct http_server_connection *conn) return -1; } - if (server->set.debug) - http_server_connection_debug(conn, "Starting SSL handshake"); + http_server_connection_debug(conn, "Starting SSL handshake"); http_server_connection_input_halt(conn); if (server->ssl_ctx == NULL) { diff --git a/src/lib-http/http-server-request.c b/src/lib-http/http-server-request.c index 75d59bd2ee..baa3a18f8c 100644 --- a/src/lib-http/http-server-request.c +++ b/src/lib-http/http-server-request.c @@ -19,14 +19,11 @@ static inline void http_server_request_debug(struct http_server_request *req, const char *format, ...) { - struct http_server *server = req->server; va_list args; - if (server->set.debug) { - va_start(args, format); - e_debug(req->event, "%s", t_strdup_vprintf(format, args)); - va_end(args); - } + va_start(args, format); + e_debug(req->event, "%s", t_strdup_vprintf(format, args)); + va_end(args); } static inline void diff --git a/src/lib-http/http-server-response.c b/src/lib-http/http-server-response.c index cfe9740d29..f77ef30f99 100644 --- a/src/lib-http/http-server-response.c +++ b/src/lib-http/http-server-response.c @@ -30,11 +30,9 @@ http_server_response_debug(struct http_server_response *resp, { va_list args; - if (resp->request->server->set.debug) { - va_start(args, format); - e_debug(resp->event, "%s", t_strdup_vprintf(format, args)); - va_end(args); - } + va_start(args, format); + e_debug(resp->event, "%s", t_strdup_vprintf(format, args)); + va_end(args); } static inline void