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: r424798 - /httpd/httpd/trunk/modules/database/mod_dbd.c
Date Sun, 23 Jul 2006 21:35:31 GMT


On 07/23/2006 10:22 PM, niq@apache.org wrote:
> Author: niq
> Date: Sun Jul 23 13:22:57 2006
> New Revision: 424798
> 
> URL: http://svn.apache.org/viewvc?rev=424798&view=rev
> Log:
> Remove dependence on server config from ap_dbd_prepare, as that may
> be called in per-directory config functions where there is no
> server context causing segfault.
> Discussion at
> http://mail-archives.apache.org/mod_mbox/httpd-dev/200607.mbox/<831327593.20060720023332%40engec.ru>
> and subsequent thread.
> 

> -    svr_cfg *svr = ap_get_module_config(s->module_config, &dbd_module);
>      dbd_prepared *prepared = apr_pcalloc(s->process->pool, sizeof(dbd_prepared));
>      prepared->label = label;
>      prepared->query = query;
> -    prepared->next = svr->prepared;
> -    svr->prepared = prepared;
> +    prepared->next = apr_hash_get(dbd_prepared_defns, s->server_hostname,
> +                                  APR_HASH_KEY_STRING);
> +    apr_hash_set(dbd_prepared_defns, s->server_hostname, APR_HASH_KEY_STRING,
> +                 prepared);

Is this thread save (concerns because dbd_prepared_defns is static)?

Regards

RĂ¼diger


Mime
View raw message