You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@locus.apache.org on 2000/06/02 17:33:22 UTC

cvs commit: apache-2.0/src/modules/mpm/winnt winnt.c

rbb         00/06/02 08:33:22

  Modified:    src      CHANGES
               src/include http_config.h
               src/main http_config.c
               src/modules/mpm/dexter dexter.c
               src/modules/mpm/mpmt_beos mpmt_beos.c
               src/modules/mpm/mpmt_pthread mpmt_pthread.c
               src/modules/mpm/prefork prefork.c
               src/modules/mpm/spmt_os2 spmt_os2.c
               src/modules/mpm/winnt winnt.c
  Log:
  Add pre_config hooks back in for all modules.  This is important for the
  server tokens code that is coming soon.
  
  Revision  Changes    Path
  1.128     +3 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.127
  retrieving revision 1.128
  diff -u -r1.127 -r1.128
  --- CHANGES	2000/06/01 22:52:50	1.127
  +++ CHANGES	2000/06/02 15:33:13	1.128
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0a4
   
  +  *) Add pre-config hooks back to all modules.
  +     [Ryan Bloom]
  +
     *) Fix a SIGSEGV in ap_md5digest(), which is used when you have
        ContentDigest enabled and we can't/don't mmap the file. 
        [Jeff Trawick]
  
  
  
  1.28      +4 -5      apache-2.0/src/include/http_config.h
  
  Index: http_config.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/http_config.h,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- http_config.h	2000/05/30 02:42:32	1.27
  +++ http_config.h	2000/06/02 15:33:14	1.28
  @@ -226,7 +226,6 @@
                                    * (see also mod_so).
                                    */
       void (*rewrite_args) (process_rec *process);
  -    void (*pre_config) (ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp);
       void *(*create_dir_config) (ap_pool_t *p, char *dir);
       void *(*merge_dir_config) (ap_pool_t *p, void *base_conf, void *new_conf);
       void *(*create_server_config) (ap_pool_t *p, server_rec *s);
  @@ -271,8 +270,7 @@
   				NULL, \
   				NULL, \
   				MODULE_MAGIC_COOKIE, \
  -                                NULL, \
  -                                NULL
  +                                NULL      /* rewrite args spot */
   
   #define MPM20_MODULE_STUFF	MODULE_MAGIC_NUMBER_MAJOR, \
   				MODULE_MAGIC_NUMBER_MINOR, \
  @@ -383,10 +381,9 @@
   API_EXPORT(void) ap_show_directives(void);
   API_EXPORT(void) ap_show_modules(void);
   API_EXPORT(server_rec*) ap_read_config(process_rec *process, ap_pool_t *temp_pool, const char *config_name);
  +API_EXPORT(void) ap_pre_config_hook(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s);
   API_EXPORT(void) ap_post_config_hook(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s);
   API_EXPORT(void) ap_run_rewrite_args(process_rec *process);
  -API_EXPORT(void) ap_run_pre_config(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp);
  -
   API_EXPORT(void) ap_register_hooks(module *m);
   
   /* For http_request.c... */
  @@ -429,6 +426,8 @@
   
     /* Hooks */
   AP_DECLARE_HOOK(int,header_parser,(request_rec *))
  +AP_DECLARE_HOOK(void,pre_config,
  +	     (ap_pool_t *pconf,ap_pool_t *plog,ap_pool_t *ptemp))
   AP_DECLARE_HOOK(void,post_config,
   	     (ap_pool_t *pconf,ap_pool_t *plog,ap_pool_t *ptemp,server_rec *s))
   AP_DECLARE_HOOK(void,open_logs,
  
  
  
  1.57      +4 -10     apache-2.0/src/main/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_config.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- http_config.c	2000/05/30 15:56:18	1.56
  +++ http_config.c	2000/06/02 15:33:15	1.57
  @@ -95,6 +95,7 @@
   
   AP_HOOK_STRUCT(
   	    AP_HOOK_LINK(header_parser)
  +	    AP_HOOK_LINK(pre_config)
   	    AP_HOOK_LINK(post_config)
   	    AP_HOOK_LINK(open_logs)
   	    AP_HOOK_LINK(child_init)
  @@ -102,6 +103,9 @@
   
   AP_IMPLEMENT_HOOK_RUN_ALL(int,header_parser,
                             (request_rec *r),(r),OK,DECLINED)
  +AP_IMPLEMENT_HOOK_VOID(pre_config,
  +		       (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp),
  +                       (pconf,plog,ptemp))
   AP_IMPLEMENT_HOOK_VOID(post_config,
   		       (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp,
                           server_rec *s),(pconf,plog,ptemp,s))
  @@ -1582,16 +1586,6 @@
       for (m = top_module; m; m = m->next)
           if (m->rewrite_args)
               (*m->rewrite_args) (process);
  -}
  -
  -API_EXPORT(void) ap_run_pre_config(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp)
  -{
  -    module *m;
  -
  -    for (m = top_module; m; m = m->next)
  -        if (m->pre_config)
  -            (*m->pre_config) (p, plog, ptemp);
  -    init_handlers(p);
   }
   
   API_EXPORT(void) ap_post_config_hook(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s)
  
  
  
  1.89      +2 -1      apache-2.0/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- dexter.c	2000/05/27 22:40:28	1.88
  +++ dexter.c	2000/06/02 15:33:15	1.89
  @@ -1251,6 +1251,8 @@
   {
       INIT_SIGLIST()
       one_process = 0;
  +
  +    ap_hook_pre_config(dexter_pre_config, NULL, NULL, AP_HOOK_MIDDLE); 
   }
   
   static const char *set_pidfile(cmd_parms *cmd, void *dummy, char *arg) 
  @@ -1459,7 +1461,6 @@
   module MODULE_VAR_EXPORT mpm_dexter_module = {
       MPM20_MODULE_STUFF,
       NULL,                       /* hook to run before apache parses args */
  -    dexter_pre_config,          /* run hook before the configuration is read */ 
       NULL,			/* create per-directory config structure */
       NULL,			/* merge per-directory config structures */
       NULL,			/* create per-server config structure */
  
  
  
  1.28      +2 -1      apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mpmt_beos.c	2000/05/27 22:40:28	1.27
  +++ mpmt_beos.c	2000/06/02 15:33:17	1.28
  @@ -1066,6 +1066,8 @@
   {
       INIT_SIGLIST()
       one_process = 0;
  +
  +    ap_hook_pre_config(mpmt_beos_pre_config, NULL, NULL, AP_HOOK_MIDDLE);
   }
   
   
  @@ -1262,7 +1264,6 @@
   module MODULE_VAR_EXPORT mpm_mpmt_beos_module = {
       MPM20_MODULE_STUFF,
       NULL,                       /* hook to run before apache parses args */
  -    mpmt_beos_pre_config,       /* hook run before the configuration is read */
       NULL,			/* create per-directory config structure */
       NULL,			/* merge per-directory config structures */
       NULL,			/* create per-server config structure */
  
  
  
  1.81      +2 -1      apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- mpmt_pthread.c	2000/05/27 22:40:29	1.80
  +++ mpmt_pthread.c	2000/06/02 15:33:18	1.81
  @@ -1284,6 +1284,8 @@
   {
       INIT_SIGLIST()
       one_process = 0;
  +
  +    ap_hook_pre_config(mpmt_pthread_pre_config, NULL, NULL, AP_HOOK_MIDDLE);
   }
   
   
  @@ -1478,7 +1480,6 @@
   module MODULE_VAR_EXPORT mpm_mpmt_pthread_module = {
       MPM20_MODULE_STUFF,
       NULL,                       /* hook to run before apache parses args */
  -    mpmt_pthread_pre_config,    /* run hook before the configuration is read */
       NULL,			/* create per-directory config structure */
       NULL,			/* merge per-directory config structures */
       NULL,			/* create per-server config structure */
  
  
  
  1.95      +2 -1      apache-2.0/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- prefork.c	2000/05/27 22:40:30	1.94
  +++ prefork.c	2000/06/02 15:33:18	1.95
  @@ -2147,6 +2147,8 @@
       (void) set42sig();
   #endif
       /* TODO: set one_process properly */ one_process = 0;
  +
  +    ap_hook_pre_config(prefork_pre_config, NULL, NULL, AP_HOOK_MIDDLE);
   }
   
   static const char *set_pidfile(cmd_parms *cmd, void *dummy, char *arg) 
  @@ -2437,7 +2439,6 @@
   module MODULE_VAR_EXPORT mpm_prefork_module = {
       MPM20_MODULE_STUFF,
       NULL,                       /* hook to run before apache parses args */
  -    prefork_pre_config,         /* run hook before the configuration is read */
       NULL,			/* create per-directory config structure */
       NULL,			/* merge per-directory config structures */
       NULL,			/* create per-server config structure */
  
  
  
  1.41      +2 -1      apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- spmt_os2.c	2000/05/28 12:45:58	1.40
  +++ spmt_os2.c	2000/06/02 15:33:20	1.41
  @@ -1521,6 +1521,8 @@
   {
       INIT_SIGLIST();
       /* TODO: set one_process properly */ one_process = 0;
  +
  +    ap_hook_pre_config(spmt_os2_pre_config, NULL, NULL, AP_HOOK_MIDDLE);
   }
   
   static const char *set_pidfile(cmd_parms *cmd, void *dummy, char *arg) 
  @@ -1672,7 +1674,6 @@
   module MODULE_VAR_EXPORT mpm_spmt_os2_module = {
       MPM20_MODULE_STUFF,
       NULL,                       /* hook to run before apache parses args */
  -    spmt_os2_pre_config,        /* hook run before the configuration is read */
       NULL,			/* create per-directory config structure */
       NULL,			/* merge per-directory config structures */
       NULL,			/* create per-server config structure */
  
  
  
  1.72      +2 -1      apache-2.0/src/modules/mpm/winnt/winnt.c
  
  Index: winnt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/winnt.c,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- winnt.c	2000/05/27 22:40:31	1.71
  +++ winnt.c	2000/06/02 15:33:21	1.72
  @@ -1858,6 +1858,8 @@
   static void winnt_hooks(void)
   {
       one_process = 0;
  +
  +    ap_hook_pre_config(winnt_pre_config, NULL, NULL, AP_HOOK_MIDDLE);
       ap_hook_post_config(winnt_post_config, NULL, NULL, 0);
   }
   
  @@ -1970,7 +1972,6 @@
   module MODULE_VAR_EXPORT mpm_winnt_module = {
       MPM20_MODULE_STUFF,
       NULL,                       /* hook run before arguments are parsed */
  -    winnt_pre_config,           /* hook run before configuration is read */
       NULL,			/* create per-directory config structure */
       NULL,			/* merge per-directory config structures */
       NULL,			/* create per-server config structure */