httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: svn commit: r689224 - /httpd/httpd/trunk/modules/database/mod_dbd.c
Date Tue, 26 Aug 2008 21:31:25 GMT


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


Mime
View raw message