]> granicus.if.org Git - apache/commitdiff
Work if check_conn is NOTIMPL in a driver
authorNick Kew <niq@apache.org>
Wed, 9 Nov 2005 21:12:45 +0000 (21:12 +0000)
committerNick Kew <niq@apache.org>
Wed, 9 Nov 2005 21:12:45 +0000 (21:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332142 13f79535-47bb-0310-9956-ffa450edef68

modules/database/mod_dbd.c

index fff0e4b2cb590a97dbc1bbdee9bed1ca98a84837..ed09108e967369aa7c12938a1622aa30e286e952 100644 (file)
@@ -322,7 +322,8 @@ ap_dbd_t* ap_dbd_open(apr_pool_t *pool, server_rec *s)
                       "Failed to acquire DBD connection from pool!");
         return NULL;
     }
-    if (apr_dbd_check_conn(arec->driver, pool, arec->handle) != APR_SUCCESS) {
+    rv = apr_dbd_check_conn(arec->driver, pool, arec->handle);
+    if ((rv != APR_SUCCESS) && (rv != APR_ENOTIMPL)) {
         errmsg = apr_dbd_error(arec->driver, arec->handle, rv);
         if (!errmsg) {
             errmsg = "(unknown)";
@@ -351,7 +352,8 @@ ap_dbd_t* ap_dbd_open(apr_pool_t *pool, server_rec *s)
 /* since we're in nothread-land, we can mess with svr->conn with impunity */
 /* If we have a persistent connection and it's good, we'll use it */
     if (svr->conn) {
-        if (apr_dbd_check_conn(svr->conn->driver, pool, svr->conn->handle) != 0){
+        rv = apr_dbd_check_conn(svr->conn->driver, pool, svr->conn->handle);
+        if ((rv != APR_SUCCESS) && (rv != APR_ENOTIMPL)) {
             errmsg = apr_dbd_error(arec->driver, arec->handle, rv);
             if (!errmsg) {
                 errmsg = "(unknown)";