1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

drop the "container" param from ap_walk_config(). callers should simply

pass the first child, rather than expecting the walker to do it.
remove the nasty "static" variable inside ap_walk_config(). it now walks the
    tree provided with no worries about bumping up/down levels.
minor refactor between ap_walk_config() and ap_walk_config_sub() to clean up
    some logic and clarify the code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85025 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Greg Stein
2000-04-24 12:27:02 +00:00
parent c2c13c67c3
commit b97ec4c63a
3 changed files with 40 additions and 47 deletions

View File

@@ -1320,7 +1320,7 @@ CORE_EXPORT_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void *dummy,
*/
cmd->limited = tog ? ~limited : limited;
errmsg = ap_walk_config(NULL, cmd, cmd->context, 1);
errmsg = ap_walk_config(cmd->directive->first_child, cmd, cmd->context);
cmd->limited = -1;
@@ -1388,7 +1388,7 @@ static const char *dirsection(cmd_parms *cmd, void *dummy, const char *arg)
conf = (core_dir_config *)ap_set_config_vectors(cmd, new_dir_conf,
&core_module);
errmsg = ap_walk_config(NULL, cmd, new_dir_conf, 1);
errmsg = ap_walk_config(cmd->directive->first_child, cmd, new_dir_conf);
if (errmsg != NULL)
return errmsg;
@@ -1446,7 +1446,7 @@ static const char *urlsection(cmd_parms *cmd, void *dummy, const char *arg)
conf = (core_dir_config *)ap_set_config_vectors(cmd, new_url_conf,
&core_module);
errmsg = ap_walk_config(NULL, cmd, new_url_conf, 1);
errmsg = ap_walk_config(cmd->directive->first_child, cmd, new_url_conf);
if (errmsg != NULL)
return errmsg;
@@ -1513,7 +1513,7 @@ static const char *filesection(cmd_parms *cmd, core_dir_config *c,
conf = (core_dir_config *)ap_set_config_vectors(cmd, new_file_conf,
&core_module);
errmsg = ap_walk_config(NULL, cmd, new_file_conf, 1);
errmsg = ap_walk_config(cmd->directive->first_child, cmd, new_file_conf);
if (errmsg != NULL)
return errmsg;
@@ -1553,7 +1553,7 @@ static const char *start_ifmod(cmd_parms *cmd, void *dummy, char *arg)
found = ap_find_linked_module(arg);
if ((!not && found) || (not && !found)) {
return ap_walk_config(NULL, cmd, cmd->context, 1);
return ap_walk_config(cmd->directive->first_child, cmd, cmd->context);
}
return NULL;
@@ -1594,7 +1594,7 @@ static const char *start_ifdefine(cmd_parms *cmd, void *dummy, char *arg)
defined = ap_exists_config_define(arg);
if ((!not && defined) || (not && !defined)) {
return ap_walk_config(NULL, cmd, cmd->context, 1);
return ap_walk_config(cmd->directive->first_child, cmd, cmd->context);
}
return NULL;
@@ -1642,7 +1642,8 @@ static const char *virtualhost_section(cmd_parms *cmd, void *dummy, char *arg)
cmd->server = s;
errmsg = ap_walk_config(NULL, cmd, s->lookup_defaults, 1);
errmsg = ap_walk_config(cmd->directive->first_child, cmd,
s->lookup_defaults);
cmd->server = main_server;