Commit 5750e947 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Provide apr_pool_t arg to register_hooks, since anything they do in that
  step -must- be done with a pool that will not outlive the cmd pool, from
  which they may have been dynamically loaded.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87697 13f79535-47bb-0310-9956-ffa450edef68
parent dfa47334
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -396,9 +396,10 @@ struct module_struct {
     *  In this function, modules should call the ap_hook_*() functions to
     *  register an interest in a specific step in processing the current
     *  request.
     *  @param p the pool to use for all allocations
     *  @deffunc void register_hooks(void)
     */
    void (*register_hooks) (void);
    void (*register_hooks) (apr_pool_t *p);
};

/* Initializer for the first few module slots, which are only
+1 −1
Original line number Diff line number Diff line
@@ -406,7 +406,7 @@ static int check_dir_access(request_rec *r)
    return ret;
}

static void register_hooks(void)
static void register_hooks(apr_pool_t *p)
{
    ap_hook_access_checker(check_dir_access,NULL,NULL,AP_HOOK_MIDDLE);
}
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ static int check_user_access(request_rec *r)
    return HTTP_UNAUTHORIZED;
}

static void register_hooks(void)
static void register_hooks(apr_pool_t *p)
{
    ap_hook_check_user_id(authenticate_basic_user,NULL,NULL,AP_HOOK_MIDDLE);
    ap_hook_auth_checker(check_user_access,NULL,NULL,AP_HOOK_MIDDLE);
+2 −1
Original line number Diff line number Diff line
@@ -294,7 +294,8 @@ static int check_anon_access(request_rec *r)
#endif
    return DECLINED;
}
static void register_hooks(void)

static void register_hooks(apr_pool_t *p)
{
    ap_hook_check_user_id(anon_authenticate_basic_user,NULL,NULL,AP_HOOK_MIDDLE);
    ap_hook_auth_checker(check_anon_access,NULL,NULL,AP_HOOK_MIDDLE);
+1 −1
Original line number Diff line number Diff line
@@ -395,7 +395,7 @@ static int db_check_auth(request_rec *r)
    return DECLINED;
}

static void register_hooks(void)
static void register_hooks(apr_pool_t *p)
{
    ap_hook_check_user_id(db_authenticate_basic_user,NULL,NULL,AP_HOOK_MIDDLE);
    ap_hook_auth_checker(db_check_auth,NULL,NULL,AP_HOOK_MIDDLE);
Loading