You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2002/05/20 17:05:43 UTC

cvs commit: httpd-2.0/server config.c

wrowe       02/05/20 08:05:43

  Modified:    server   config.c
  Log:
    A few noops (at the moment.)  Prepare for stuffing the directive into
    the conf tree, without reinvoking the directive, even when EXEC_ON_READ.
  
  Revision  Changes    Path
  1.151     +8 -3      httpd-2.0/server/config.c
  
  Index: config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/config.c,v
  retrieving revision 1.150
  retrieving revision 1.151
  diff -u -r1.150 -r1.151
  --- config.c	17 May 2002 11:11:37 -0000	1.150
  +++ config.c	20 May 2002 15:05:43 -0000	1.151
  @@ -867,6 +867,7 @@
                                          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 @@
   
       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 @@
                   (*current)->next = sub_tree;
               }
               else {
  -                (*current) = sub_tree;
  +                *current = sub_tree;
                   if (*curr_parent) {
                       (*curr_parent)->first_child = (*current);
                   }
  @@ -979,7 +979,7 @@
           *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,
  @@ -1043,6 +1043,11 @@
                                                        mod,
                                                        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) {