Skip to content

Commit e526b54

Browse files
author
Nick Kew
committed
Work if check_conn is NOTIMPL in a driver
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332142 13f79535-47bb-0310-9956-ffa450edef68
1 parent aaf64ef commit e526b54

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

modules/database/mod_dbd.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ ap_dbd_t* ap_dbd_open(apr_pool_t *pool, server_rec *s)
322322
"Failed to acquire DBD connection from pool!");
323323
return NULL;
324324
}
325-
if (apr_dbd_check_conn(arec->driver, pool, arec->handle) != APR_SUCCESS) {
325+
rv = apr_dbd_check_conn(arec->driver, pool, arec->handle);
326+
if ((rv != APR_SUCCESS) && (rv != APR_ENOTIMPL)) {
326327
errmsg = apr_dbd_error(arec->driver, arec->handle, rv);
327328
if (!errmsg) {
328329
errmsg = "(unknown)";
@@ -351,7 +352,8 @@ ap_dbd_t* ap_dbd_open(apr_pool_t *pool, server_rec *s)
351352
/* since we're in nothread-land, we can mess with svr->conn with impunity */
352353
/* If we have a persistent connection and it's good, we'll use it */
353354
if (svr->conn) {
354-
if (apr_dbd_check_conn(svr->conn->driver, pool, svr->conn->handle) != 0){
355+
rv = apr_dbd_check_conn(svr->conn->driver, pool, svr->conn->handle);
356+
if ((rv != APR_SUCCESS) && (rv != APR_ENOTIMPL)) {
355357
errmsg = apr_dbd_error(arec->driver, arec->handle, rv);
356358
if (!errmsg) {
357359
errmsg = "(unknown)";

0 commit comments

Comments
 (0)