Commit 8cb5c4bd authored by Paul Querna's avatar Paul Querna
Browse files

* modules/database/mod_dbd.c

  (dbd_child_init): New function, wrapper around dbd_setup_init.
  (dbd_hooks): Call dbd_child_init instead of casting dbd_setup_init.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@708820 13f79535-47bb-0310-9956-ffa450edef68
parent da42a8f2
Loading
Loading
Loading
Loading
+10 −1
Changes for modules/database/mod_dbd.c: 10 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -647,6 +647,15 @@ static apr_status_t dbd_setup_init(apr_pool_t *pool, server_rec *s)
    return rv;
}

static void dbd_child_init(apr_pool_t *p, server_rec *s)
{
  apr_status_t rv = dbd_setup_init(p, s);
  if (rv) {
    ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
                 "DBD: child init failed!");
  }
}

#if APR_HAS_THREADS
static apr_status_t dbd_setup_lock(server_rec *s, dbd_group_t *group)
{
@@ -904,7 +913,7 @@ static void dbd_hooks(apr_pool_t *pool)
{
    ap_hook_pre_config(dbd_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_post_config(dbd_post_config, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init((void*)dbd_setup_init, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init(dbd_child_init, NULL, NULL, APR_HOOK_MIDDLE);

    APR_REGISTER_OPTIONAL_FN(ap_dbd_prepare);
    APR_REGISTER_OPTIONAL_FN(ap_dbd_open);