* (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);
NULL, \
NULL, \
MODULE_MAGIC_COOKIE, \
- NULL, \
- NULL
+ NULL /* rewrite args spot */
#define MPM20_MODULE_STUFF MODULE_MAGIC_NUMBER_MAJOR, \
MODULE_MAGIC_NUMBER_MINOR, \
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... */
/* 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,
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)
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))
(*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)
{
ap_run_post_config(pconf,plog,ptemp,s);
{
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)
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 */
{
INIT_SIGLIST()
one_process = 0;
+
+ ap_hook_pre_config(mpmt_beos_pre_config, NULL, NULL, AP_HOOK_MIDDLE);
}
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 */
{
INIT_SIGLIST()
one_process = 0;
+
+ ap_hook_pre_config(mpmt_pthread_pre_config, NULL, NULL, AP_HOOK_MIDDLE);
}
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 */
(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)
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 */
{
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)
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 */