]> granicus.if.org Git - apache/commitdiff
A few noops (at the moment.) Prepare for stuffing the directive into
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 20 May 2002 15:05:43 +0000 (15:05 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 20 May 2002 15:05:43 +0000 (15:05 +0000)
  the conf tree, without reinvoking the directive, even when EXEC_ON_READ.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95186 13f79535-47bb-0310-9956-ffa450edef68

server/config.c

index 75cb3849f344ab85cd2f31990337bebdb76c1858..0b0ded380a92c1bc11b16dd28036cd8ead2c30a0 100644 (file)
@@ -867,6 +867,7 @@ static const char *ap_build_config_sub(apr_pool_t *p, apr_pool_t *temp_pool,
                                        ap_directive_t **curr_parent,
                                        ap_directive_t **conftree)
 {
+    const char *retval = NULL;
     const char *args;
     char *cmd_name;
     ap_directive_t *newdir;
@@ -905,7 +906,6 @@ static const char *ap_build_config_sub(apr_pool_t *p, apr_pool_t *temp_pool,
 
     if ((cmd = ap_find_command_in_modules(cmd_name, &mod)) != NULL) {
         if (cmd->req_override & EXEC_ON_READ) {
-            const char *retval;
             ap_directive_t *sub_tree = NULL;
 
             parms->err_directive = newdir;
@@ -915,7 +915,7 @@ static const char *ap_build_config_sub(apr_pool_t *p, apr_pool_t *temp_pool,
                 (*current)->next = sub_tree;
             }
             else {
-                (*current) = sub_tree;
+                *current = sub_tree;
                 if (*curr_parent) {
                     (*curr_parent)->first_child = (*current);
                 }
@@ -979,7 +979,7 @@ static const char *ap_build_config_sub(apr_pool_t *p, apr_pool_t *temp_pool,
         *current = ap_add_node(curr_parent, *current, newdir, 0);
     }
 
-    return NULL;
+    return retval;
 }
 
 AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p,
@@ -1044,6 +1044,11 @@ static const char *ap_walk_config_sub(const ap_directive_t *current,
                                                      parms->pool);
             const char *retval;
 
+            /* Once was enough? */
+            if (cmd->req_override & EXEC_ON_READ) {
+                return NULL;
+            }
+
             retval = invoke_cmd(cmd, parms, dir_config, current->args);
             if (retval == NULL) {
                 return NULL;