From: Nick Kew Date: Wed, 10 Aug 2005 16:05:17 +0000 (+0000) Subject: Update mod_dbd to API that hides apr_dbd_driver_t struct. X-Git-Tag: 2.1.7~5^2~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=614849d27a8261afd2c11945ecebcf80c89081b4;p=thirdparty%2Fapache%2Fhttpd.git Update mod_dbd to API that hides apr_dbd_driver_t struct. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@231275 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/experimental/mod_dbd.c b/modules/experimental/mod_dbd.c index 370568a2bfb..ccf359a81b0 100644 --- a/modules/experimental/mod_dbd.c +++ b/modules/experimental/mod_dbd.c @@ -34,7 +34,6 @@ #include "apr_dbd.h" #include "mod_dbd.h" - extern module AP_MODULE_DECLARE_DATA dbd_module; /************ svr cfg: manage db connection pool ****************/ @@ -368,6 +367,11 @@ void ap_dbd_close(server_rec *s, ap_dbd_t *sql) } #endif } +static apr_status_t dbd_close(void *CONN) +{ + ap_dbd_t *conn = CONN; + return apr_dbd_close(conn->driver, conn->handle); +} #if APR_HAS_THREADS typedef struct { ap_dbd_t *conn; @@ -395,8 +399,7 @@ ap_dbd_t *ap_dbd_acquire(request_rec *r) apr_pool_cleanup_null); } else { - apr_pool_cleanup_register(r->pool, req->conn->handle, - (void*)req->conn->driver->close, + apr_pool_cleanup_register(r->pool, req->conn, dbd_close, apr_pool_cleanup_null); } } @@ -414,8 +417,7 @@ ap_dbd_t *ap_dbd_acquire(request_rec *r) if ( ret ) { ap_set_module_config(r->request_config, &dbd_module, ret); if (!svr->persist) { - apr_pool_cleanup_register(r->pool, svr->conn->handle, - (void*)svr->conn->driver->close, + apr_pool_cleanup_register(r->pool, svr->conn, dbd_close, apr_pool_cleanup_null); } /* if persist then dbd_open registered cleanup on proc pool */