diff options
author | Stefan Fritsch <sf@apache.org> | 2011-06-06 21:26:56 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2011-06-06 21:26:56 +0000 |
commit | c9fd2623da21dc757571e93f8c14344946e59ec7 (patch) | |
tree | 97105b5ef35c293af0ec20d6e04492bf889a9098 /modules/experimental | |
parent | 8b98cff9529e5842e292caf5417e425f18d31038 (diff) | |
download | httpd-c9fd2623da21dc757571e93f8c14344946e59ec7.tar.gz |
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/experimental')
-rw-r--r-- | modules/experimental/mod_noloris.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/experimental/mod_noloris.c b/modules/experimental/mod_noloris.c index f2c423cf3d..f2abeef32b 100644 --- a/modules/experimental/mod_noloris.c +++ b/modules/experimental/mod_noloris.c @@ -35,6 +35,7 @@ #include "httpd.h" #include "http_config.h" +#include "http_core.h" #include "http_connection.h" #include "http_log.h" #include "mpm_common.h" @@ -43,7 +44,6 @@ #include "scoreboard.h" module AP_MODULE_DECLARE_DATA noloris_module; -module AP_MODULE_DECLARE_DATA core_module; #define ADDR_MAX_SIZE 48 @@ -68,7 +68,7 @@ static int noloris_conn(conn_rec *conn) shm_rec = apr_shm_baseaddr_get(shm); while (shm_rec[0] != '\0') { if (!strcmp(shm_rec, conn->remote_ip)) { - apr_socket_t *csd = ap_get_module_config(conn->conn_config, &core_module); + apr_socket_t *csd = ap_get_core_module_config(conn->conn_config); ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, conn, "Dropping connection from banned IP %s", conn->remote_ip); |