Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

Re: svn commit: r689224 - /httpd/httpd/trunk/modules/database/mod_dbd.c

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


rpluem at apache

Aug 26, 2008, 2:31 PM

Post #1 of 2 (187 views)
Permalink
Re: svn commit: r689224 - /httpd/httpd/trunk/modules/database/mod_dbd.c

On 08/26/2008 11:03 PM, niq[at]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


nick at webthing

Aug 26, 2008, 2:42 PM

Post #2 of 2 (183 views)
Permalink
Re: svn commit: r689224 - /httpd/httpd/trunk/modules/database/mod_dbd.c [In reply to]

On Tue, 26 Aug 2008 23:31:25 +0200
Ruediger Pluem <rpluem[at]apache.org> wrote:

> [chop]

Bah. Thanks for spotting that.

Just trying to clean up my repo here - going through differences
between /trunk/ and mine and either committing or abandoning
local variants.

--
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.