Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 97499 invoked from network); 25 Feb 2008 19:52:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Feb 2008 19:52:00 -0000 Received: (qmail 49578 invoked by uid 500); 25 Feb 2008 19:51:51 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 49522 invoked by uid 500); 25 Feb 2008 19:51:51 -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 49511 invoked by uid 99); 25 Feb 2008 19:51:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2008 11:51:51 -0800 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; Mon, 25 Feb 2008 19:51:12 +0000 Received: (qmail 97251 invoked by uid 2161); 25 Feb 2008 19:51:31 -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 EAF3C1721C for ; Mon, 25 Feb 2008 20:51:14 +0100 (CET) Message-ID: <47C31C3B.3040100@apache.org> Date: Mon, 25 Feb 2008 20:51:23 +0100 From: Ruediger Pluem User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080201 SeaMonkey/1.1.8 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: svn commit: r630323 - in /httpd/httpd/trunk/modules/ssl: ssl_engine_config.c ssl_private.h ssl_scache.c ssl_scache_dbm.c ssl_scache_dc.c ssl_scache_memcache.c ssl_scache_shmcb.c References: <20080222210943.053A51A9838@eris.apache.org> <47C002B4.6010209@apache.org> <20080225105906.GA7265@redhat.com> In-Reply-To: <20080225105906.GA7265@redhat.com> 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 02/25/2008 11:59 AM, Joe Orton wrote: > On Sat, Feb 23, 2008 at 12:25:40PM +0100, Ruediger Pluem wrote: >> On 02/22/2008 10:09 PM, jorton@apache.org wrote: >>> --- httpd/httpd/trunk/modules/ssl/ssl_scache.c (original) >>> +++ httpd/httpd/trunk/modules/ssl/ssl_scache.c Fri Feb 22 13:09:40 2008 >>> @@ -40,6 +40,20 @@ >>> void ssl_scache_init(server_rec *s, apr_pool_t *p) >>> { >>> SSLModConfigRec *mc = myModConfig(s); >>> + apr_status_t rv; >>> + >>> + /* ### push this up into scache_init??? */ >>> + { >>> + void *data; >>> + const char *userdata_key = "ssl_scache_init"; >>> + >>> + apr_pool_userdata_get(&data, userdata_key, s->process->pool); >>> + if (!data) { >>> + apr_pool_userdata_set((const void *)1, userdata_key, >>> + apr_pool_cleanup_null, s->process->pool); >>> + return; >> Slightly confused now. This should prevent that we initialize twice correct? >> If yes, shouldn't the return be in the else branch (aka if apr_pool_userdata_get >> returns data we have been already here once)? > > Ah, no, that's not quite the intent. The intent of the code is only to > ignore the first post_config run during startup. It's necessary and > correct for this code to initialize the cache for every subsequent > invocation of the post_config hook; the configuration may be different > each time, and pconf is used as the parent pool for all this stuff (also > cleared each time). > > I've updated the comment here in r630805 since it was stale anyway - > does that make sense now? Ah. Thanks for the clarification. This makes now sense to me. So its exactly the other way round I anticipated: Initialize every time except for the very first time, correct? Regards RĂ¼diger >