Commit e6f3b022 authored by Nick Kew's avatar Nick Kew
Browse files

Retrieve optional functions in time!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@454687 13f79535-47bb-0310-9956-ffa450edef68
parent 88adfe07
Loading
Loading
Loading
Loading
+2 −6
Changes for modules/mappers/mod_rewrite.c: 2 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -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 */