From 58fe893e8826a88f30ddd9bb4df7f888ec530513 Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Sun, 21 Jan 2001 22:14:16 +0000 Subject: [PATCH] Remove AddModule and ClearModuleList. Neither directive really makes much sense anymore, since we use the hooks to order modules correctly. This also removes the possability that one module will ever register the same function for the same hook twice. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87784 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 6 ++++++ STATUS | 11 +---------- include/http_config.h | 6 ------ modules/http/http_core.c | 32 -------------------------------- server/config.c | 18 ------------------ 5 files changed, 7 insertions(+), 66 deletions(-) diff --git a/CHANGES b/CHANGES index 5ef6342f0e..4640b28508 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,11 @@ Changes with Apache 2.0b1 + *) Remove AddModule and ClearModuleList directives. Both of these + directives were used to ensure that modules could be enabled + in the correct order. That requirement is now gone, because + we use hooks to ensure that modules are in the correct order. + [Ryan Bloom] + *) When SuExec is specified, we need to add it to the list of targets to be built. If we don't, then any changes to the configuration won't affect SuExec, unless 'make suexec' is diff --git a/STATUS b/STATUS index 3c2a407318..293239441e 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2001/01/21 17:51:08 $] +Last modified at [$Date: 2001/01/21 22:14:13 $] Release: @@ -192,15 +192,6 @@ RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP: should probably move into build/special.mk (the make file used for building Apache modules). - * toss the AddModule directive. we add all prelinked modules - automatically, and the LoadModule directive now implies - AddModule. so... there is no point to it any more. - RBB says: We do not add all prelinked modules back after - a clear module list. If we remove AddModule, we - also need to remove ClearModuleList, because - it wouldn't make any sense. - - PRs that have been suspended forever waiting for someone to put them into 'the next release': diff --git a/include/http_config.h b/include/http_config.h index 1ef0b7539d..663e657679 100644 --- a/include/http_config.h +++ b/include/http_config.h @@ -567,12 +567,6 @@ AP_DECLARE(void) ap_remove_loaded_module(module *mod); * @deffunc int ap_add_named_module(const char *name, apr_pool_t *p) */ AP_DECLARE(int) ap_add_named_module(const char *name, apr_pool_t *p); -/** - * Clear all of the modules from the loaded module list - * @param p The pool valid for the lifetime of the modules - * @deffunc void ap_add_named_module(apr_pool_t *p) - */ -AP_DECLARE(void) ap_clear_module_list(apr_pool_t *p); /** * Find the name of the specified module * @param m The module to get the name for diff --git a/modules/http/http_core.c b/modules/http/http_core.c index e50d020743..4c22635e2c 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -1895,34 +1895,6 @@ static const char *add_input_filter(cmd_parms *cmd, void *dummy, const char *arg return NULL; } -static const char *add_module_command(cmd_parms *cmd, void *dummy, - const char *arg) -{ - const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); - if (err != NULL) { - return err; - } - - if (!ap_add_named_module(arg, cmd->pool)) { - return apr_pstrcat(cmd->pool, "Cannot add module via name '", arg, - "': not in list of loaded modules", NULL); - } - *(ap_directive_t **)dummy = NULL; - return NULL; -} - -static const char *clear_module_list_command(cmd_parms *cmd, void *dummy) -{ - const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); - if (err != NULL) { - return err; - } - - ap_clear_module_list(cmd->pool); - *(ap_directive_t **)dummy = NULL; - return NULL; -} - static const char *set_server_string_slot(cmd_parms *cmd, void *dummy, const char *arg) { @@ -2849,10 +2821,6 @@ AP_INIT_TAKE1("UseCanonicalName", set_use_canonical_name, NULL, RSRC_CONF|ACCESS_CONF, "How to work out the ServerName : Port when constructing URLs"), /* TODO: RlimitFoo should all be part of mod_cgi, not in the core */ -AP_INIT_ITERATE("AddModule", add_module_command, NULL, - RSRC_CONF, "The name of a module"), -AP_INIT_NO_ARGS("ClearModuleList", clear_module_list_command, NULL, - RSRC_CONF, NULL), /* TODO: ListenBacklog in MPM */ AP_INIT_TAKE1("Include", include_config, NULL, (RSRC_CONF | ACCESS_CONF | EXEC_ON_READ), diff --git a/server/config.c b/server/config.c index 17ba11e759..1286665eda 100644 --- a/server/config.c +++ b/server/config.c @@ -579,24 +579,6 @@ AP_DECLARE(int) ap_add_named_module(const char *name, apr_pool_t *p) return 0; } -/* Clear the internal list of modules, in preparation for starting over. */ -AP_DECLARE(void) ap_clear_module_list(apr_pool_t *p) -{ - module **m = &top_module; - module **next_m; - - while (*m) { - next_m = &((*m)->next); - *m = NULL; - m = next_m; - } - - apr_hook_deregister_all(); - - /* This is required; so we add it always. */ - ap_add_named_module("http_core.c", p); -} - /***************************************************************** * * Resource, access, and .htaccess config files now parsed by a common -- 2.50.1