[svn:mod_parrot] r436 - in mod_parrot/branches/hll-modules: include lib/ModParrot/HLL src

[email protected] Fri, 19 Sep 2008 13:18:04 -0700 (PDT)
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Fri Sep 19 13:18:03 2008
New Revision: 436

Modified:
   mod_parrot/branches/hll-modules/include/modparrot_config.h
   mod_parrot/branches/hll-modules/lib/ModParrot/HLL/pir.pir
   mod_parrot/branches/hll-modules/src/mod_parrot.c
   mod_parrot/branches/hll-modules/src/module.c

Log:
cleanup some random failures


Modified: mod_parrot/branches/hll-modules/include/modparrot_config.h
==============================================================================
--- mod_parrot/branches/hll-modules/include/modparrot_config.h	(original)
+++ mod_parrot/branches/hll-modules/include/modparrot_config.h	Fri Sep 19 13:18:03 2008
@@ -205,9 +205,23 @@
 const char *modparrot_cmd_options(cmd_parms *, void *, const char *);
 
 /* handlers for HLL apache modules */
-int modparrot_meta_response_handler(request_rec *);
+int modparrot_meta_open_logs_handler(apr_pool_t *, apr_pool_t *, apr_pool_t *,
+    server_rec *);
+int modparrot_meta_post_config_handler(apr_pool_t *, apr_pool_t *,
+    apr_pool_t *, server_rec *);
+void modparrot_meta_child_init_handler(apr_pool_t *, server_rec *s);
+int modparrot_meta_pre_connection_handler(conn_rec *, void *);
+int modparrot_meta_process_connection_handler(conn_rec *);
+int modparrot_meta_map_to_storage_handler(request_rec *);
+int modparrot_meta_trans_handler(request_rec *);
+int modparrot_meta_post_read_request_handler(request_rec *);
+int modparrot_meta_header_parser_handler(request_rec *);
+int modparrot_meta_access_handler(request_rec *);
 int modparrot_meta_authen_handler(request_rec *);
 int modparrot_meta_authz_handler(request_rec *);
-int modparrot_meta_access_handler(request_rec *);
+int modparrot_meta_response_handler(request_rec *);
+int modparrot_meta_type_handler(request_rec *);
+int modparrot_meta_fixup_handler(request_rec *);
+int modparrot_meta_log_handler(request_rec *);
 
 #endif /* _MODPARROT_CONFIG_H */

Modified: mod_parrot/branches/hll-modules/lib/ModParrot/HLL/pir.pir
==============================================================================
--- mod_parrot/branches/hll-modules/lib/ModParrot/HLL/pir.pir	(original)
+++ mod_parrot/branches/hll-modules/lib/ModParrot/HLL/pir.pir	Fri Sep 19 13:18:03 2008
@@ -367,8 +367,7 @@
     # decline if we have no handler in this section
     $S0 = cfg['post_config_handler']
     if $S0 goto run_handler
-    # open_logs handlers must return OK
-    status = ap_const['OK']
+    status = ap_const['DECLINED']
     .return(status)
 
   run_handler:
@@ -410,8 +409,7 @@
     # decline if we have no handler in this section
     $S0 = cfg['child_init_handler']
     if $S0 goto run_handler
-    # open_logs handlers must return OK
-    status = ap_const['OK']
+    status = ap_const['DECLINED']
     .return(status)
 
   run_handler:
@@ -449,8 +447,7 @@
     # decline if we have no handler in this section
     $S0 = cfg['pre_connection_handler']
     if $S0 goto run_handler
-    # open_logs handlers must return OK
-    status = ap_const['OK']
+    status = ap_const['DECLINED']
     .return(status)
 
   run_handler:
@@ -486,8 +483,7 @@
     # decline if we have no handler in this section
     $S0 = cfg['process_connection_handler']
     if $S0 goto run_handler
-    # open_logs handlers must return OK
-    status = ap_const['OK']
+    status = ap_const['DECLINED']
     .return(status)
 
   run_handler:
@@ -496,7 +492,7 @@
 
     # get the pool objects
     # XXX need access to these from the context!
-    $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'c'
+    $P0 = get_root_global [ '_modparrot'; 'NCI' ], 'conn_rec'
     c = $P0()
 
     status = handler(c)

Modified: mod_parrot/branches/hll-modules/src/mod_parrot.c
==============================================================================
--- mod_parrot/branches/hll-modules/src/mod_parrot.c	(original)
+++ mod_parrot/branches/hll-modules/src/mod_parrot.c	Fri Sep 19 13:18:03 2008
@@ -358,18 +358,18 @@
     }
 
 MP_REQUEST_METAHANDLER(map_to_storage_handler, 1)
-MP_REQUEST_METAHANDLER(translate_name_handler, 0)
+MP_REQUEST_METAHANDLER(trans_handler, 0)
 MP_REQUEST_METAHANDLER(post_read_request_handler, 0)
 MP_REQUEST_METAHANDLER(header_parser_handler, 0)
 MP_REQUEST_METAHANDLER(access_handler, 0)
 MP_REQUEST_METAHANDLER(authen_handler, 0)
 MP_REQUEST_METAHANDLER(authz_handler, 0)
 MP_REQUEST_METAHANDLER(response_handler, 0)
-MP_REQUEST_METAHANDLER(type_checker_handler, 0)
+MP_REQUEST_METAHANDLER(type_handler, 0)
 MP_REQUEST_METAHANDLER(fixup_handler, 0)
 MP_REQUEST_METAHANDLER(log_handler, 0)
 
-static int modparrot_meta_pre_connection_handler(conn_rec *c, void *csd)
+int modparrot_meta_pre_connection_handler(conn_rec *c, void *csd)
 {
     modparrot_context *ctxp;
     modparrot_srv_config *mpcfg;
@@ -432,7 +432,7 @@
     return DECLINED;
 }
 
-static int modparrot_meta_process_connection_handler(conn_rec *c)
+int modparrot_meta_process_connection_handler(conn_rec *c)
 {
     modparrot_context *ctxp;
     modparrot_srv_config *mpcfg;
@@ -493,7 +493,7 @@
 }
 
 /* XXX - how do we notify apache of failures with a void return??? */
-static void modparrot_meta_child_init_handler(apr_pool_t *p, server_rec *s)
+void modparrot_meta_child_init_handler(apr_pool_t *p, server_rec *s)
 {
     modparrot_context *ctxp;
     modparrot_srv_config *mpcfg;
@@ -554,7 +554,7 @@
     return DECLINED;
 }
 
-static int modparrot_meta_post_config_handler(apr_pool_t *pconf,
+int modparrot_meta_post_config_handler(apr_pool_t *pconf,
     apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 {
     modparrot_context *ctxp;
@@ -669,7 +669,7 @@
     return OK;
 }
 
-static int modparrot_meta_open_logs_handler(apr_pool_t *pconf,
+int modparrot_meta_open_logs_handler(apr_pool_t *pconf,
     apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 {
     modparrot_context *ctxp;

Modified: mod_parrot/branches/hll-modules/src/module.c
==============================================================================
--- mod_parrot/branches/hll-modules/src/module.c	(original)
+++ mod_parrot/branches/hll-modules/src/module.c	Fri Sep 19 13:18:03 2008
@@ -206,14 +206,38 @@
     /* XXX does this also work for Apache >= 2.3 */
     static const char *aszSucc[] = { "mod_auth.c", NULL };
 
-    ap_hook_check_user_id(modparrot_meta_authen_handler, NULL, NULL,
+    ap_hook_open_logs(modparrot_meta_open_logs_handler, NULL, NULL,
+        APR_HOOK_MIDDLE);
+    ap_hook_post_config(modparrot_meta_post_config_handler, NULL, NULL,
+        APR_HOOK_MIDDLE);
+    ap_hook_child_init(modparrot_meta_child_init_handler, NULL, NULL,
+        APR_HOOK_MIDDLE);
+    ap_hook_pre_connection(modparrot_meta_pre_connection_handler, NULL, NULL,
+        APR_HOOK_MIDDLE);
+    ap_hook_process_connection(modparrot_meta_process_connection_handler, NULL,
+        NULL, APR_HOOK_MIDDLE);
+    ap_hook_map_to_storage(modparrot_meta_map_to_storage_handler, NULL, NULL,
+        APR_HOOK_MIDDLE);
+    ap_hook_translate_name(modparrot_meta_trans_handler, NULL, NULL,
+        APR_HOOK_MIDDLE);
+    ap_hook_post_read_request(modparrot_meta_post_read_request_handler, NULL,
+        NULL, APR_HOOK_MIDDLE);
+    ap_hook_header_parser(modparrot_meta_header_parser_handler, NULL, NULL,
         APR_HOOK_MIDDLE);
     ap_hook_access_checker(modparrot_meta_access_handler, NULL, NULL,
         APR_HOOK_MIDDLE);
+    ap_hook_check_user_id(modparrot_meta_authen_handler, NULL, NULL,
+        APR_HOOK_MIDDLE);
     ap_hook_auth_checker(modparrot_meta_authz_handler, NULL, aszSucc,
         APR_HOOK_MIDDLE);
     ap_hook_handler(modparrot_meta_response_handler, NULL, NULL,
         APR_HOOK_MIDDLE);
+    ap_hook_type_checker(modparrot_meta_type_handler, NULL, NULL,
+        APR_HOOK_MIDDLE);
+    ap_hook_fixups(modparrot_meta_fixup_handler, NULL, NULL,
+        APR_HOOK_MIDDLE);
+    ap_hook_log_transaction(modparrot_meta_log_handler, NULL, NULL,
+        APR_HOOK_MIDDLE);
 }
 
 /* this is very leaky */