httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r231275 - /httpd/httpd/trunk/modules/experimental/mod_dbd.c
Date Wed, 10 Aug 2005 16:05:21 GMT
Author: niq
Date: Wed Aug 10 09:05:17 2005
New Revision: 231275

URL: http://svn.apache.org/viewcvs?rev=231275&view=rev
Log:
Update mod_dbd to API that hides apr_dbd_driver_t struct.

Modified:
    httpd/httpd/trunk/modules/experimental/mod_dbd.c

Modified: httpd/httpd/trunk/modules/experimental/mod_dbd.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/experimental/mod_dbd.c?rev=231275&r1=231274&r2=231275&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/experimental/mod_dbd.c (original)
+++ httpd/httpd/trunk/modules/experimental/mod_dbd.c Wed Aug 10 09:05:17 2005
@@ -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 @@
     }
 #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 @@
                                           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 @@
         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 */



Mime
View raw message