From: Nick Kew Date: Tue, 10 Oct 2006 10:37:37 +0000 (+0000) Subject: Retrieve optional functions in time! X-Git-Tag: 2.3.0~2085 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=719b8f18bc7553eefc0c970783dfdcea29ae7325;p=thirdparty%2Fapache%2Fhttpd.git Retrieve optional functions in time! git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@454687 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 9b452a2d7ed..5bfed52e2ea 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -4130,6 +4130,8 @@ static int pre_config(apr_pool_t *pconf, map_pfn_register("escape", rewrite_mapfunc_escape); map_pfn_register("unescape", rewrite_mapfunc_unescape); } + dbd_acquire = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_acquire); + dbd_prepare = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_prepare); return OK; } @@ -4910,11 +4912,6 @@ static void ap_register_rewrite_mapfunc(char *name, rewrite_mapfunc_t *func) apr_hash_set(mapfunc_hash, name, strlen(name), (const void *)func); } -static void optional_fns(void) { - dbd_acquire = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_acquire); - dbd_prepare = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_prepare); -} - static void register_hooks(apr_pool_t *p) { /* fixup after mod_proxy, so that the proxied url will not @@ -4932,7 +4929,6 @@ static void register_hooks(apr_pool_t *p) ap_hook_fixups(hook_fixup, aszPre, NULL, APR_HOOK_FIRST); ap_hook_fixups(hook_mimetype, NULL, NULL, APR_HOOK_LAST); ap_hook_translate_name(hook_uri2file, NULL, NULL, APR_HOOK_FIRST); - ap_hook_optional_fn_retrieve(optional_fns, NULL, NULL, APR_HOOK_MIDDLE); } /* the main config structure */