summaryrefslogtreecommitdiffstats
path: root/modules/proxy
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2011-06-06 23:26:56 +0200
committerStefan Fritsch <sf@apache.org>2011-06-06 23:26:56 +0200
commitc9fd2623da21dc757571e93f8c14344946e59ec7 (patch)
tree97105b5ef35c293af0ec20d6e04492bf889a9098 /modules/proxy
parentTraceEnable is per-virtualhost, not just per-server. (diff)
downloadapache2-c9fd2623da21dc757571e93f8c14344946e59ec7.tar.xz
apache2-c9fd2623da21dc757571e93f8c14344946e59ec7.zip
Introduce ap_(get|set)_core_module_config() functions/macros and use them
everywhere. We know that the core module has module_index 0. Therefore we can save some pointer operations in ap_get_module_config(cv, &core_module) and ap_set_module_config(cv, &core_module, val). As these are called rather often, this may actually have some (small) measurable effect. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132781 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy')
-rw-r--r--modules/proxy/mod_proxy.c2
-rw-r--r--modules/proxy/mod_proxy_connect.c2
-rw-r--r--modules/proxy/mod_proxy_fdpass.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index f387e467c4..10cd577da3 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -886,7 +886,7 @@ static int proxy_handler(request_rec *r)
if (r->method_number == M_TRACE) {
core_server_config *coreconf = (core_server_config *)
- ap_get_module_config(sconf, &core_module);
+ ap_get_core_module_config(sconf);
if (coreconf->trace_enable == AP_TRACE_DISABLE)
{
diff --git a/modules/proxy/mod_proxy_connect.c b/modules/proxy/mod_proxy_connect.c
index 5119172880..578313ad2d 100644
--- a/modules/proxy/mod_proxy_connect.c
+++ b/modules/proxy/mod_proxy_connect.c
@@ -209,7 +209,7 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
apr_status_t err, rv;
apr_size_t nbytes;
char buffer[HUGE_STRING_LEN];
- apr_socket_t *client_socket = ap_get_module_config(c->conn_config, &core_module);
+ apr_socket_t *client_socket = ap_get_core_module_config(c->conn_config);
int failed, rc;
int client_error = 0;
apr_pollset_t *pollset;
diff --git a/modules/proxy/mod_proxy_fdpass.c b/modules/proxy/mod_proxy_fdpass.c
index 69b5435471..2da9395ac2 100644
--- a/modules/proxy/mod_proxy_fdpass.c
+++ b/modules/proxy/mod_proxy_fdpass.c
@@ -223,7 +223,7 @@ static int proxy_fdpass_handler(request_rec *r, proxy_worker *worker,
/* XXXXX: THIS IS AN EVIL HACK */
/* There should really be a (documented) public API for this ! */
- clientsock = ap_get_module_config(r->connection->conn_config, &core_module);
+ clientsock = ap_get_core_module_config(r->connection->conn_config);
rv = send_socket(r->pool, sock, clientsock);
if (rv != APR_SUCCESS) {
@@ -245,7 +245,7 @@ static int proxy_fdpass_handler(request_rec *r, proxy_worker *worker,
"proxy: FD: failed to create dummy socket");
return HTTP_INTERNAL_SERVER_ERROR;
}
- ap_set_module_config(r->connection->conn_config, &core_module, dummy);
+ ap_set_core_module_config(r->connection->conn_config, dummy);
}