Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 91812 invoked from network); 26 Aug 2008 21:31:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Aug 2008 21:31:48 -0000 Received: (qmail 37343 invoked by uid 500); 26 Aug 2008 21:31:42 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 37295 invoked by uid 500); 26 Aug 2008 21:31:42 -0000 Mailing-List: contact dev-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 dev@httpd.apache.org Received: (qmail 37284 invoked by uid 99); 26 Aug 2008 21:31:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Aug 2008 14:31:42 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 26 Aug 2008 21:30:53 +0000 Received: (qmail 91277 invoked by uid 2161); 26 Aug 2008 21:31:23 -0000 Received: from [192.168.2.4] (euler.heimnetz.de [192.168.2.4]) by cerberus.heimnetz.de (Postfix on SuSE Linux 7.0 (i386)) with ESMTP id 3BFFF1721C for ; Tue, 26 Aug 2008 23:31:13 +0200 (CEST) Message-ID: <48B4762D.5080500@apache.org> Date: Tue, 26 Aug 2008 23:31:25 +0200 From: Ruediger Pluem User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: svn commit: r689224 - /httpd/httpd/trunk/modules/database/mod_dbd.c References: <20080826210347.6590F2388961@eris.apache.org> In-Reply-To: <20080826210347.6590F2388961@eris.apache.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 08/26/2008 11:03 PM, niq@apache.org wrote: > Author: niq > Date: Tue Aug 26 14:03:46 2008 > New Revision: 689224 > > URL: http://svn.apache.org/viewvc?rev=689224&view=rev > Log: > Try to get a meaningful error message when dbd_open fails > > Modified: > httpd/httpd/trunk/modules/database/mod_dbd.c > > Modified: httpd/httpd/trunk/modules/database/mod_dbd.c > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/database/mod_dbd.c?rev=689224&r1=689223&r2=689224&view=diff > ============================================================================== > --- httpd/httpd/trunk/modules/database/mod_dbd.c (original) > +++ httpd/httpd/trunk/modules/database/mod_dbd.c Tue Aug 26 14:03:46 2008 > @@ -464,6 +464,7 @@ > apr_pool_t *rec_pool, *prepared_pool; > ap_dbd_t *rec; > apr_status_t rv; > + const char *err = ""; > > rv = apr_pool_create(&rec_pool, pool); > if (rv != APR_SUCCESS) { > @@ -507,12 +508,12 @@ > return rv; > } > > - rv = apr_dbd_open(rec->driver, rec->pool, cfg->params, &rec->handle); > + rv = apr_dbd_open_ex(rec->driver, rec->pool, cfg->params, &rec->handle, &err); > if (rv != APR_SUCCESS) { > switch (rv) { > case APR_EGENERAL: > ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server, > - "DBD: Can't connect to %s", cfg->name); > + "DBD: Can't connect to %s: %s", cfg->name, &err); Shouldn't this be err instead of &err here? Regards RĂ¼diger