Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 86985 invoked from network); 12 Dec 2006 14:18:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Dec 2006 14:18:03 -0000 Received: (qmail 48133 invoked by uid 500); 12 Dec 2006 14:18:11 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 48087 invoked by uid 500); 12 Dec 2006 14:18:10 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 48073 invoked by uid 99); 12 Dec 2006 14:18:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Dec 2006 06:18:10 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Dec 2006 06:18:02 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 2550A1A981A; Tue, 12 Dec 2006 06:17:18 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r486157 - in /httpd/httpd/branches/2.2.x: STATUS modules/database/mod_dbd.c Date: Tue, 12 Dec 2006 14:17:18 -0000 To: cvs@httpd.apache.org From: jim@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061212141718.2550A1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jim Date: Tue Dec 12 06:17:17 2006 New Revision: 486157 URL: http://svn.apache.org/viewvc?view=rev&rev=486157 Log: Merge r485311 from trunk: Stop mod_dbd emitting bogus error messages when it's loaded but not configured. Submitted by: niq Reviewed by: jim Modified: httpd/httpd/branches/2.2.x/STATUS httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c Modified: httpd/httpd/branches/2.2.x/STATUS URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?view=diff&rev=486157&r1=486156&r2=486157 ============================================================================== --- httpd/httpd/branches/2.2.x/STATUS (original) +++ httpd/httpd/branches/2.2.x/STATUS Tue Dec 12 06:17:17 2006 @@ -79,11 +79,6 @@ [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_dbd: Don't try to set up a connection pool (and emit bogus - error messages) when DBD isn't configured. - http://svn.apache.org/viewvc?view=rev&revision=485311 - +1: niq, rpluem, jim - PATCHES PROPOSED TO BACKPORT FROM TRUNK: * mpm_winnt: Fix return values from wait_for_many_objects. Modified: httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c?view=diff&rev=486157&r1=486156&r2=486157 ============================================================================== --- httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c (original) +++ httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c Tue Dec 12 06:17:17 2006 @@ -361,6 +361,15 @@ svr_cfg *svr = ap_get_module_config(s->module_config, &dbd_module); apr_status_t rv; + /* dbd_setup in 2.2.3 and under was causing spurious error messages + * when dbd isn't configured. We can stop that with a quick check here + * together with a similar check in ap_dbd_open (where being + * unconfigured is a genuine error that must be reported). + */ + if (svr->name == no_dbdriver) { + return APR_SUCCESS; + } + if (!svr->persist) { return APR_SUCCESS; } @@ -442,6 +451,12 @@ apr_status_t rv = APR_SUCCESS; const char *errmsg; + /* If nothing is configured, we shouldn't be here */ + if (svr->name == no_dbdriver) { + ap_log_perror(APLOG_MARK, APLOG_ERR, 0, pool, "DBD: not configured"); + return NULL; + } + if (!svr->persist) { /* Return a once-only connection */ rv = dbd_construct(&rec, svr, s->process->pool); @@ -479,6 +494,12 @@ const char *errmsg; void *rec = NULL; svr_cfg *svr = ap_get_module_config(s->module_config, &dbd_module); + + /* If nothing is configured, we shouldn't be here */ + if (svr->name == no_dbdriver) { + ap_log_perror(APLOG_MARK, APLOG_ERR, 0, pool, "DBD: not configured"); + return NULL; + } if (!svr->persist) { /* Return a once-only connection */