From: Mladen Turk Date: Wed, 2 Aug 2006 12:03:42 +0000 (+0000) Subject: Cleanup: Remove close_on_recycle from proxy_conn_rec. X-Git-Tag: 2.3.0~2183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bbf36995e1e708c26ea42c1525897edda15a638;p=thirdparty%2Fapache%2Fhttpd.git Cleanup: Remove close_on_recycle from proxy_conn_rec. It behaves the same as close. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427959 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h index 413953e65b7..5da9b569c7b 100644 --- a/modules/proxy/mod_proxy.h +++ b/modules/proxy/mod_proxy.h @@ -228,7 +228,6 @@ typedef struct { apr_sockaddr_t *addr; /* Preparsed remote address info */ apr_uint32_t flags; /* Conection flags */ int close; /* Close 'this' connection */ - int close_on_recycle; /* Close the connection when returning to pool */ proxy_worker *worker; /* Connection pool this connection belogns to */ void *data; /* per scheme connection data */ #if APR_HAS_THREADS diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c index bbca7fe9ba6..3c73c55e04f 100644 --- a/modules/proxy/mod_proxy_ajp.c +++ b/modules/proxy/mod_proxy_ajp.c @@ -502,7 +502,7 @@ static int proxy_ajp_handler(request_rec *r, proxy_worker *worker, r->server); if (status != OK) { if (backend) { - backend->close_on_recycle = 1; + backend->close = 1; ap_proxy_release_connection(scheme, backend, r->server); } return status; @@ -510,7 +510,7 @@ static int proxy_ajp_handler(request_rec *r, proxy_worker *worker, } backend->is_ssl = 0; - backend->close_on_recycle = 0; + backend->close = 0; /* Step One: Determine Who To Connect To */ status = ap_proxy_determine_connection(p, r, conf, worker, backend, diff --git a/modules/proxy/mod_proxy_ftp.c b/modules/proxy/mod_proxy_ftp.c index c56fca4ef92..f0b6118b8c4 100644 --- a/modules/proxy/mod_proxy_ftp.c +++ b/modules/proxy/mod_proxy_ftp.c @@ -731,7 +731,7 @@ static apr_status_t proxy_ftp_cleanup(request_rec *r, proxy_conn_rec *backend) { - backend->close_on_recycle = 1; + backend->close = 1; ap_set_module_config(r->connection->conn_config, &proxy_ftp_module, NULL); ap_proxy_release_connection("FTP", backend, r->server); @@ -940,7 +940,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker, status = ap_proxy_acquire_connection("FTP", &backend, worker, r->server); if (status != OK) { if (backend) { - backend->close_on_recycle = 1; + backend->close = 1; ap_proxy_release_connection("FTP", backend, r->server); } return status; diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index ea49d1cd90d..5e4085aae87 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -966,7 +966,7 @@ skip_body: * otherwise sent Connection: Keep-Alive. */ if (!force10) { - if (p_conn->close || p_conn->close_on_recycle) { + if (p_conn->close) { buf = apr_pstrdup(p, "Connection: close" CRLF); } else { @@ -1656,7 +1656,7 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker, * not work. */ if (is_ssl) - backend->close_on_recycle = 1; + backend->close = 1; /* Step One: Determine Who To Connect To */ if ((status = ap_proxy_determine_connection(p, r, conf, worker, backend, diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 34eaae36698..801495a4029 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1553,7 +1553,7 @@ static apr_status_t connection_cleanup(void *theconn) #endif /* determine if the connection need to be closed */ - if (conn->close_on_recycle || conn->close) { + if (conn->close) { apr_pool_t *p = conn->pool; apr_pool_clear(conn->pool); memset(conn, 0, sizeof(proxy_conn_rec)); @@ -1824,7 +1824,6 @@ PROXY_DECLARE(int) ap_proxy_acquire_connection(const char *proxy_function, (*conn)->worker = worker; (*conn)->close = 0; - (*conn)->close_on_recycle = 0; #if APR_HAS_THREADS (*conn)->inreslist = 0; #endif