]> granicus.if.org Git - apache/commitdiff
try to be a better example of a process-connection hook
authorJeff Trawick <trawick@apache.org>
Fri, 7 Jun 2002 19:20:39 +0000 (19:20 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 7 Jun 2002 19:20:39 +0000 (19:20 +0000)
(compiling cleanly is a good start)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95572 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/mod_example.c

index d741d11b155605154d6afc4032edc137045499a8..fa85e7da02c6b188820c54df46cff2992e674ff2 100644 (file)
@@ -1056,6 +1056,7 @@ static int x_pre_connection(conn_rec *c, void *csd)
  */
 static int x_process_connection(conn_rec *c)
 {
+    return DECLINED;
 }
 
 /*
@@ -1267,10 +1268,7 @@ static void x_register_hooks(apr_pool_t *p)
     ap_hook_handler(x_handler, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_quick_handler(x_quick_handler, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_pre_connection(x_pre_connection, NULL, NULL, APR_HOOK_MIDDLE);
-/* This module doesn't have a process connection phase, but I am leaving
- * the code in, in-case somebody wants to add one.
- */
-/*    ap_hook_process_connection(x_fixer_upper, NULL, NULL, APR_HOOK_MIDDLE); */
+    ap_hook_process_connection(x_process_connection, NULL, NULL, APR_HOOK_MIDDLE);
     /* [1] post read_request handling */
     ap_hook_post_read_request(x_post_read_request, NULL, NULL,
                               APR_HOOK_MIDDLE);