diff options
author | Roy T. Fielding <fielding@apache.org> | 1999-08-26 16:18:40 +0200 |
---|---|---|
committer | Roy T. Fielding <fielding@apache.org> | 1999-08-26 16:18:40 +0200 |
commit | e3978962f93ce24ab63c0634c306b0a98faa7965 (patch) | |
tree | fe1d2f7f0b4e0d8450599dbb619d2c03011bd057 /modules/mappers/mod_userdir.c | |
parent | Changes from pthreads. Removes timeouts, adds mutex. (diff) | |
download | apache2-e3978962f93ce24ab63c0634c306b0a98faa7965.tar.xz apache2-e3978962f93ce24ab63c0634c306b0a98faa7965.zip |
Start to implement module-defined hooks that are a) fast and b) typesafe.
Replace pre_connection module call with a register_hook call and
implement pre_connection as a hook. The intent is that these hooks will
be extended to allow Apache to be multi-protocol, and also to allow the
calling order to be specified on a per-hook/per-module basis. [Ben Laurie]
Port a bunch of modules to the new module structure.
["Michael H. Voase" <mvoase@midcoast.com.au>]
Submitted by: Ben Laurie
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83770 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/mappers/mod_userdir.c')
-rw-r--r-- | modules/mappers/mod_userdir.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/modules/mappers/mod_userdir.c b/modules/mappers/mod_userdir.c index 5c0e26d275..105d0040e9 100644 --- a/modules/mappers/mod_userdir.c +++ b/modules/mappers/mod_userdir.c @@ -92,6 +92,7 @@ #include "httpd.h" #include "http_config.h" +#include "http_request.h" module userdir_module; @@ -326,24 +327,20 @@ static int translate_userdir(request_rec *r) return DECLINED; } +static void register_hooks(void) +{ + static const char * const aszSucc[]={ "mod_alias.c",NULL }; + + ap_hook_translate_name(translate_userdir,NULL,aszSucc,HOOK_MIDDLE); +} + module userdir_module = { - STANDARD_MODULE_STUFF, - NULL, /* initializer */ + STANDARD20_MODULE_STUFF, NULL, /* dir config creater */ NULL, /* dir merger --- default is to override */ create_userdir_config, /* server config */ NULL, /* merge server config */ userdir_cmds, /* command table */ NULL, /* handlers */ - translate_userdir, /* filename translation */ - NULL, /* check_user_id */ - NULL, /* check auth */ - NULL, /* check access */ - NULL, /* type_checker */ - NULL, /* fixups */ - NULL, /* logger */ - NULL, /* header parser */ - NULL, /* child_init */ - NULL, /* child_exit */ - NULL /* post read-request */ + register_hooks /* register hooks */ }; |