]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Strawman hooks implementation (beginning of).
authorBen Laurie <ben@apache.org>
Mon, 5 Jul 1999 13:00:45 +0000 (13:00 +0000)
committerBen Laurie <ben@apache.org>
Mon, 5 Jul 1999 13:00:45 +0000 (13:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83434 13f79535-47bb-0310-9956-ffa450edef68

include/http_connection.h
server/connection.c

index 95657a15ebf7ea97495b5a5b6863434869008098..90f284133c2d3548e94a96198d23d047c3e2cbd8 100644 (file)
@@ -58,6 +58,8 @@
 #ifndef APACHE_HTTP_CONNECTION_H
 #define APACHE_HTTP_CONNECTION_H
 
+#include "ap_hooks.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -68,6 +70,9 @@ conn_rec *ap_new_connection(pool *p, server_rec *server, BUFF *inout,
                            int child_num, int thread_num);
 CORE_EXPORT(void) ap_process_connection(conn_rec *);
 
+  /* Hooks */
+DECLARE_HOOK(void,pre_connection,(conn_rec *))
+
 #ifdef __cplusplus
 }
 #endif
index 557f3188115f93cd15fe311db344a16824744564..fbfda3402cc21edf8f6af2358ed508893aa490e5 100644 (file)
 #include "http_config.h"
 #include "http_vhost.h"
 
+HOOK_STRUCT(
+           HOOK_LINK(pre_connection)
+);
+
+IMPLEMENT_VOID_HOOK(pre_connection,(conn_rec *c),(c),1)
+
 /* TODO: re-implement the lingering close stuff */
 #define NO_LINGCLOSE
 
@@ -188,7 +194,7 @@ CORE_EXPORT(void) ap_process_connection(conn_rec *c)
 
     ap_update_vhost_given_ip(c);
 
-    ap_run_pre_connection(c);
+    run_pre_connection(c);
 
     /*
      * Read and process each request found on our connection