]> granicus.if.org Git - apache/commitdiff
Retrieve optional functions in time!
authorNick Kew <niq@apache.org>
Tue, 10 Oct 2006 10:37:37 +0000 (10:37 +0000)
committerNick Kew <niq@apache.org>
Tue, 10 Oct 2006 10:37:37 +0000 (10:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@454687 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_rewrite.c

index 9b452a2d7ed1592d8abf5f590db0899cf481e489..5bfed52e2ea32f82c18f478498df10b4ae41a5be 100644 (file)
@@ -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 */