ben 99/08/01 07:12:37
Modified: mpm/src/include http_config.h mpm/src/main http_config.c http_core.c http_main.c mpm/src/modules/mpm/prefork prefork.c mpm/src/modules/standard mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_echo.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c Log: Another hook. Revision Changes Path 1.13 +4 -4 apache-2.0/mpm/src/include/http_config.h Index: http_config.h =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- http_config.h 1999/07/27 21:16:36 1.12 +++ http_config.h 1999/08/01 14:12:29 1.13 @@ -211,7 +211,6 @@ * (see also mod_so). */ - void (*open_logs)(pool *pconf, pool *plog, pool *ptemp, server_rec *); void (*post_config)(pool *pconf, pool *plog, pool *ptemp, server_rec *); void (*child_init)(pool *pchild, server_rec *); @@ -333,7 +332,6 @@ void ap_show_directives(void); void ap_show_modules(void); server_rec *ap_read_config(pool *conf_pool, pool *temp_pool, const char *config_name); -void ap_open_logs_hook(pool *pconf, pool *plog, pool *ptemp, server_rec *s); void ap_post_config_hook(pool *pconf, pool *plog, pool *ptemp, server_rec *s); void ap_child_init_hook(pool *pchild, server_rec *s); @@ -371,11 +369,13 @@ CORE_EXPORT(void *) ap_set_config_vectors(cmd_parms *parms, void *config, module *mod); CORE_EXPORT(const char *) ap_handle_command(cmd_parms *parms, void *config, const char *l); +#endif + /* Hooks */ DECLARE_HOOK(int,header_parser,(request_rec *)) DECLARE_HOOK(void,pre_config,(pool *pconf,pool *plog,pool *ptemp)) - -#endif +DECLARE_HOOK(void,open_logs, + (pool *pconf, pool *plog, pool *ptemp, server_rec *s)) #ifdef __cplusplus } 1.17 +4 -9 apache-2.0/mpm/src/main/http_config.c Index: http_config.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- http_config.c 1999/07/31 09:31:20 1.16 +++ http_config.c 1999/08/01 14:12:30 1.17 @@ -84,11 +84,15 @@ HOOK_STRUCT( HOOK_LINK(header_parser) HOOK_LINK(pre_config) + HOOK_LINK(open_logs) ) IMPLEMENT_HOOK_RUN_ALL(int,header_parser,(request_rec *r),(r),OK,DECLINED) IMPLEMENT_HOOK_VOID(pre_config,(pool *pconf,pool *plog,pool *ptemp), (pconf,plog,ptemp)) +IMPLEMENT_HOOK_VOID(open_logs, + (pool *pconf, pool *plog, pool *ptemp, server_rec *s), + (pconf,plog,ptemp,s)) DEF_Explain @@ -1449,15 +1453,6 @@ (*m->post_config) (pconf, plog, ptemp, s); build_method_shortcuts(); init_handlers(pconf); -} - -void ap_open_logs_hook(pool *pconf, pool *plog, pool *ptemp, server_rec *s) -{ - module *m; - - for (m = top_module; m; m = m->next) - if (m->open_logs) - (*m->open_logs) (pconf, plog, ptemp, s); } void ap_child_init_hook(pool *pchild, server_rec *s) 1.14 +1 -1 apache-2.0/mpm/src/main/http_core.c Index: http_core.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- http_core.c 1999/07/27 21:16:39 1.13 +++ http_core.c 1999/08/01 14:12:30 1.14 @@ -2643,6 +2643,7 @@ HOOK_REALLY_LAST); ap_hook_http_method(core_method,NULL,NULL,HOOK_REALLY_LAST); ap_hook_default_port(core_port,NULL,NULL,HOOK_REALLY_LAST); + ap_hook_open_logs(core_open_logs,NULL,NULL,HOOK_MIDDLE); /* FIXME: I suspect we can eliminate the need for these - Ben */ ap_hook_type_checker(do_nothing,NULL,NULL,HOOK_REALLY_LAST); } @@ -2650,7 +2651,6 @@ API_VAR_EXPORT module core_module = { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - core_open_logs, /* open_logs */ NULL, /* child_init */ create_core_dir_config, /* create per-directory config structure */ merge_core_dir_configs, /* merge per-directory config structures */ 1.7 +2 -2 apache-2.0/mpm/src/main/http_main.c Index: http_main.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_main.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- http_main.c 1999/07/27 21:16:39 1.6 +++ http_main.c 1999/08/01 14:12:30 1.7 @@ -327,7 +327,7 @@ } ap_clear_pool(plog); - ap_open_logs_hook(pconf, plog, ptemp, server_conf); + ap_run_open_logs(pconf, plog, ptemp, server_conf); ap_post_config_hook(pconf, plog, ptemp, server_conf); ap_clear_pool(ptemp); @@ -338,7 +338,7 @@ ap_run_pre_config(pconf, plog, ptemp); server_conf = ap_read_config(pconf, ptemp, confname); ap_clear_pool(plog); - ap_open_logs_hook(pconf, plog, ptemp, server_conf); + ap_run_open_logs(pconf, plog, ptemp, server_conf); ap_post_config_hook(pconf, plog, ptemp, server_conf); ap_destroy_pool(ptemp); 1.22 +0 -1 apache-2.0/mpm/src/modules/mpm/prefork/prefork.c Index: prefork.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- prefork.c 1999/07/27 21:16:43 1.21 +++ prefork.c 1999/08/01 14:12:31 1.22 @@ -3085,7 +3085,6 @@ module MODULE_VAR_EXPORT mpm_prefork_module = { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* child_init */ NULL, /* create per-directory config structure */ NULL, /* merge per-directory config structures */ 1.11 +0 -1 apache-2.0/mpm/src/modules/standard/mod_access.c Index: mod_access.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_access.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- mod_access.c 1999/07/27 21:16:44 1.10 +++ mod_access.c 1999/08/01 14:12:32 1.11 @@ -390,7 +390,6 @@ { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* initializer */ create_access_dir_config, /* dir config creater */ NULL, /* dir merger --- default is to override */ 1.10 +0 -1 apache-2.0/mpm/src/modules/standard/mod_actions.c Index: mod_actions.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_actions.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- mod_actions.c 1999/07/27 21:16:44 1.9 +++ mod_actions.c 1999/08/01 14:12:32 1.10 @@ -212,7 +212,6 @@ { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* child initializer */ create_action_dir_config, /* dir config creater */ merge_action_dir_configs, /* dir merger --- default is to override */ 1.12 +0 -1 apache-2.0/mpm/src/modules/standard/mod_alias.c Index: mod_alias.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_alias.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- mod_alias.c 1999/07/27 21:16:45 1.11 +++ mod_alias.c 1999/08/01 14:12:32 1.12 @@ -407,7 +407,6 @@ { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* initializer */ create_alias_dir_config, /* dir config creater */ merge_alias_dir_config, /* dir merger --- default is to override */ 1.11 +0 -1 apache-2.0/mpm/src/modules/standard/mod_asis.c Index: mod_asis.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_asis.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- mod_asis.c 1999/07/27 21:16:45 1.10 +++ mod_asis.c 1999/08/01 14:12:32 1.11 @@ -127,7 +127,6 @@ { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* child initaliser */ NULL, /* create per-directory config structure */ NULL, /* merge per-directory config structures */ 1.11 +0 -1 apache-2.0/mpm/src/modules/standard/mod_auth.c Index: mod_auth.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_auth.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- mod_auth.c 1999/07/27 21:16:45 1.10 +++ mod_auth.c 1999/08/01 14:12:32 1.11 @@ -319,7 +319,6 @@ { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* initializer */ create_auth_dir_config, /* dir config creater */ NULL, /* dir merger --- default is to override */ 1.11 +0 -1 apache-2.0/mpm/src/modules/standard/mod_autoindex.c Index: mod_autoindex.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_autoindex.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- mod_autoindex.c 1999/07/27 21:16:46 1.10 +++ mod_autoindex.c 1999/08/01 14:12:33 1.11 @@ -1651,7 +1651,6 @@ { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* child initializer */ create_autoindex_config, /* dir config creater */ merge_autoindex_configs, /* dir merger --- default is to override */ 1.10 +0 -1 apache-2.0/mpm/src/modules/standard/mod_dir.c Index: mod_dir.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_dir.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- mod_dir.c 1999/07/27 21:16:46 1.9 +++ mod_dir.c 1999/08/01 14:12:33 1.10 @@ -225,7 +225,6 @@ module MODULE_VAR_EXPORT dir_module = { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* child_init */ create_dir_config, /* create per-directory config structure */ merge_dir_configs, /* merge per-directory config structures */ 1.5 +0 -1 apache-2.0/mpm/src/modules/standard/mod_echo.c Index: mod_echo.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_echo.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- mod_echo.c 1999/07/27 21:16:46 1.4 +++ mod_echo.c 1999/08/01 14:12:33 1.5 @@ -64,7 +64,6 @@ API_VAR_EXPORT module echo_module = { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* child_init */ NULL, /* create per-directory config structure */ NULL, /* merge per-directory config structures */ 1.12 +0 -1 apache-2.0/mpm/src/modules/standard/mod_env.c Index: mod_env.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_env.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- mod_env.c 1999/07/27 21:16:46 1.11 +++ mod_env.c 1999/08/01 14:12:33 1.12 @@ -257,7 +257,6 @@ { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* child initializer */ create_env_dir_config, /* dir config creater */ merge_env_dir_configs, /* dir merger --- default is to override */ 1.11 +0 -1 apache-2.0/mpm/src/modules/standard/mod_imap.c Index: mod_imap.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_imap.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- mod_imap.c 1999/07/27 21:16:47 1.10 +++ mod_imap.c 1999/08/01 14:12:33 1.11 @@ -898,7 +898,6 @@ { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* child initializer */ create_imap_dir_config, /* dir config creater */ merge_imap_dir_configs, /* dir merger --- default is to override */ 1.11 +1 -1 apache-2.0/mpm/src/modules/standard/mod_log_config.c Index: mod_log_config.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_log_config.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- mod_log_config.c 1999/07/27 21:16:47 1.10 +++ mod_log_config.c 1999/08/01 14:12:33 1.11 @@ -1107,6 +1107,7 @@ static void register_hooks() { + ap_hook_open_logs(init_config_log,NULL,NULL,HOOK_MIDDLE); ap_hook_log_transaction(multi_log_transaction,NULL,NULL,HOOK_MIDDLE); } @@ -1114,7 +1115,6 @@ { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - init_config_log, /* open_logs */ NULL, /* child_init */ NULL, /* create per-dir config */ NULL, /* merge per-dir config */ 1.10 +0 -1 apache-2.0/mpm/src/modules/standard/mod_mime.c Index: mod_mime.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_mime.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- mod_mime.c 1999/07/27 21:16:47 1.9 +++ mod_mime.c 1999/08/01 14:12:33 1.10 @@ -387,7 +387,6 @@ module MODULE_VAR_EXPORT mime_module = { STANDARD20_MODULE_STUFF, mime_post_config, /* post_config */ - NULL, /* open_logs */ NULL, /* child_init */ create_mime_dir_config, /* create per-directory config structure */ merge_mime_dir_configs, /* merge per-directory config structures */ 1.11 +0 -1 apache-2.0/mpm/src/modules/standard/mod_negotiation.c Index: mod_negotiation.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_negotiation.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- mod_negotiation.c 1999/07/27 21:16:47 1.10 +++ mod_negotiation.c 1999/08/01 14:12:34 1.11 @@ -2734,7 +2734,6 @@ { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* initializer */ create_neg_dir_config, /* dir config creator */ merge_neg_dir_configs, /* dir merger --- default is to override */ 1.12 +0 -1 apache-2.0/mpm/src/modules/standard/mod_setenvif.c Index: mod_setenvif.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_setenvif.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- mod_setenvif.c 1999/07/27 21:16:47 1.11 +++ mod_setenvif.c 1999/08/01 14:12:34 1.12 @@ -409,7 +409,6 @@ { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* initializer */ NULL, /* dir config creater */ NULL, /* dir merger --- default is to override */ 1.12 +0 -1 apache-2.0/mpm/src/modules/standard/mod_userdir.c Index: mod_userdir.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_userdir.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- mod_userdir.c 1999/07/27 21:16:47 1.11 +++ mod_userdir.c 1999/08/01 14:12:34 1.12 @@ -337,7 +337,6 @@ module userdir_module = { STANDARD20_MODULE_STUFF, NULL, /* post_config */ - NULL, /* open_logs */ NULL, /* child initializer */ NULL, /* dir config creater */ NULL, /* dir merger --- default is to override */