httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/mpm/winnt winnt.c
Date Thu, 30 Mar 2000 15:30:37 GMT
rbb         00/03/30 07:30:36

  Modified:    src/include ap_mmn.h http_config.h
               src/main http_config.c http_main.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:
  Put the pre_config hook back into the table.  This solves the problem of
  the pre-config hook only being valid for MPM's.  This patch also
  distinguishes between STANDARD modules and MPM's.
  
  Revision  Changes    Path
  1.3       +2 -2      apache-2.0/src/include/ap_mmn.h
  
  Index: ap_mmn.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/ap_mmn.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ap_mmn.h	2000/03/10 00:05:50	1.2
  +++ ap_mmn.h	2000/03/30 15:30:32	1.3
  @@ -231,9 +231,9 @@
   #define MODULE_MAGIC_COOKIE 0x41503133UL /* "AP13" */
   
   #ifndef MODULE_MAGIC_NUMBER_MAJOR
  -#define MODULE_MAGIC_NUMBER_MAJOR 19990320
  +#define MODULE_MAGIC_NUMBER_MAJOR 20000330
   #endif
  -#define MODULE_MAGIC_NUMBER_MINOR 6                     /* 0...n */
  +#define MODULE_MAGIC_NUMBER_MINOR 1                     /* 0...n */
   #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR	/* backward compat */
   
   /* Useful for testing for features. */
  
  
  
  1.9       +10 -2     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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- http_config.h	2000/03/23 14:48:45	1.8
  +++ http_config.h	2000/03/30 15:30:32	1.9
  @@ -210,7 +210,7 @@
                                    * It's mainly important for the DSO facility
                                    * (see also mod_so).
                                    */
  -
  +    void *(*pre_config) (ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp, server_rec
*s);
       void *(*create_dir_config) (ap_context_t *p, char *dir);
       void *(*merge_dir_config) (ap_context_t *p, void *base_conf, void *new_conf);
       void *(*create_server_config) (ap_context_t *p, server_rec *s);
  @@ -254,6 +254,15 @@
   				__FILE__, \
   				NULL, \
   				NULL, \
  +				MODULE_MAGIC_COOKIE, \
  +                                NULL
  +
  +#define MPM20_MODULE_STUFF	MODULE_MAGIC_NUMBER_MAJOR, \
  +				MODULE_MAGIC_NUMBER_MINOR, \
  +				-1, \
  +				__FILE__, \
  +				NULL, \
  +				NULL, \
   				MODULE_MAGIC_COOKIE
   
   /* Generic accessors for other modules to get at their own module-specific
  @@ -368,7 +377,6 @@
   
     /* Hooks */
   DECLARE_HOOK(int,header_parser,(request_rec *))
  -DECLARE_HOOK(void,pre_config,(ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp))
   DECLARE_HOOK(void,post_config,
   	     (ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp,server_rec *s))
   DECLARE_HOOK(void,open_logs,
  
  
  
  1.32      +11 -3     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.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- http_config.c	2000/03/28 18:36:34	1.31
  +++ http_config.c	2000/03/30 15:30:32	1.32
  @@ -85,15 +85,12 @@
   
   HOOK_STRUCT(
   	    HOOK_LINK(header_parser)
  -	    HOOK_LINK(pre_config)
   	    HOOK_LINK(post_config)
   	    HOOK_LINK(open_logs)
   	    HOOK_LINK(child_init)
   )
   
   IMPLEMENT_HOOK_RUN_ALL(int,header_parser,(request_rec *r),(r),OK,DECLINED)
  -IMPLEMENT_HOOK_VOID(pre_config,(ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp),
  -		    (pconf,plog,ptemp))
   IMPLEMENT_HOOK_VOID(post_config,
   		    (ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s),
   		    (pconf,plog,ptemp,s))
  @@ -1309,6 +1306,17 @@
       if (m->create_dir_config)
           ap_set_module_config(s->lookup_defaults, m,
                                (*m->create_dir_config)(p, NULL));
  +}
  +
  +void run_pre_config(ap_context_t *p, ap_context_t *plog,
  +                       ap_context_t *ptemp, server_rec *s)
  +{
  +    module *m;
  +
  +    for (m = top_module; m; m = m->next)
  +        if (m->pre_config)
  +            (*m->pre_config) (p, plog, ptemp, s);
  +    init_handlers(p);
   }
   
   void ap_post_config_hook(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp,
server_rec *s)
  
  
  
  1.38      +2 -6      apache-2.0/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_main.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- http_main.c	2000/03/28 22:59:05	1.37
  +++ http_main.c	2000/03/30 15:30:32	1.38
  @@ -275,10 +275,6 @@
       destroy_and_exit_process(process, 1);
   }
   
  -
  -
  -
  -
   ap_context_t *g_pHookPool;
   
   #ifdef WIN32
  @@ -368,7 +364,7 @@
          for example, to settle down. */
   
       ap_server_root = def_server_root;
  -    ap_run_pre_config(pconf, plog, ptemp);
  +    run_pre_config(pconf, plog, ptemp, server_conf);
       server_conf = ap_read_config(process, ptemp, confname);
       if (configtestonly) {
   	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "Syntax OK\n");
  @@ -387,7 +383,7 @@
   	}
   	ap_create_context(&ptemp, pconf);
   	ap_server_root = def_server_root;
  -	ap_run_pre_config(pconf, plog, ptemp);
  +	run_pre_config(pconf, plog, ptemp, server_conf);
   	server_conf = ap_read_config(process, ptemp, confname);
   	ap_clear_pool(plog);
   	ap_run_open_logs(pconf, plog, ptemp, server_conf);
  
  
  
  1.65      +2 -2      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.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- dexter.c	2000/03/10 00:07:01	1.64
  +++ dexter.c	2000/03/30 15:30:33	1.65
  @@ -1498,7 +1498,6 @@
   
   static void dexter_hooks(void)
   {
  -    ap_hook_pre_config(dexter_pre_config, NULL, NULL, HOOK_MIDDLE);
       INIT_SIGLIST()
       one_process = 0;
   }
  @@ -1707,7 +1706,8 @@
   };
   
   module MODULE_VAR_EXPORT mpm_dexter_module = {
  -    STANDARD20_MODULE_STUFF,
  +    MPM20_MODULE_STUFF,
  +    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.19      +2 -2      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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- mpmt_beos.c	2000/03/21 14:13:16	1.18
  +++ mpmt_beos.c	2000/03/30 15:30:34	1.19
  @@ -1212,7 +1212,6 @@
   
   static void mpmt_beos_hooks(void)
   {
  -    ap_hook_pre_config(mpmt_beos_pre_config,NULL,NULL,HOOK_MIDDLE);
       INIT_SIGLIST()
       one_process = 0;
   }
  @@ -1409,7 +1408,8 @@
   };
   
   module MODULE_VAR_EXPORT mpm_mpmt_beos_module = {
  -    STANDARD20_MODULE_STUFF,
  +    MPM20_MODULE_STUFF,
  +    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.57      +2 -2      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.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- mpmt_pthread.c	2000/03/10 00:07:04	1.56
  +++ mpmt_pthread.c	2000/03/30 15:30:34	1.57
  @@ -1526,7 +1526,6 @@
   
   static void mpmt_pthread_hooks(void)
   {
  -    ap_hook_pre_config(mpmt_pthread_pre_config,NULL,NULL,HOOK_MIDDLE);
       INIT_SIGLIST()
       one_process = 0;
   }
  @@ -1721,7 +1720,8 @@
   };
   
   module MODULE_VAR_EXPORT mpm_mpmt_pthread_module = {
  -    STANDARD20_MODULE_STUFF,
  +    MPM20_MODULE_STUFF,
  +    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.71      +2 -2      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.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- prefork.c	2000/03/17 21:58:30	1.70
  +++ prefork.c	2000/03/30 15:30:35	1.71
  @@ -2407,7 +2407,6 @@
   
   static void prefork_hooks(void)
   {
  -    ap_hook_pre_config(prefork_pre_config,NULL,NULL,HOOK_MIDDLE);
       INIT_SIGLIST();
   #ifdef AUX3
       (void) set42sig();
  @@ -2595,7 +2594,8 @@
   };
   
   module MODULE_VAR_EXPORT mpm_prefork_module = {
  -    STANDARD20_MODULE_STUFF,
  +    MPM20_MODULE_STUFF,
  +    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.31      +2 -2      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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- spmt_os2.c	2000/03/10 00:07:06	1.30
  +++ spmt_os2.c	2000/03/30 15:30:36	1.31
  @@ -1632,7 +1632,6 @@
   
   static void spmt_os2_hooks(void)
   {
  -    ap_hook_pre_config(spmt_os2_pre_config,NULL,NULL,HOOK_MIDDLE);
       INIT_SIGLIST();
       /* TODO: set one_process properly */ one_process = 0;
   }
  @@ -1784,7 +1783,8 @@
   };
   
   module MODULE_VAR_EXPORT mpm_spmt_os2_module = {
  -    STANDARD20_MODULE_STUFF,
  +    MPM20_MODULE_STUFF,
  +    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.45      +2 -2      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.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- winnt.c	2000/03/24 05:03:22	1.44
  +++ winnt.c	2000/03/30 15:30:36	1.45
  @@ -1747,7 +1747,6 @@
   //    INIT_SIGLIST()
       one_process = 0;
       /* Configuration hooks implemented by http_config.c ... */
  -    ap_hook_pre_config(winnt_pre_config, NULL, NULL, HOOK_MIDDLE);
   }
   
   /* 
  @@ -1851,7 +1850,8 @@
   };
   
   module MODULE_VAR_EXPORT mpm_winnt_module = {
  -    STANDARD20_MODULE_STUFF,
  +    MPM20_MODULE_STUFF,
  +    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 */
  
  
  

Mime
View raw message