From a333bc0fa4abae122d3d99d99ff26b364cf7a211 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Mon, 25 Feb 2008 10:56:37 +0000 Subject: [PATCH] * modules/ssl/ssl_scache.c (ssl_scache_init): Reformat code and update the comment. No functional change. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@630805 13f79535-47bb-0310-9956-ffa450edef68 --- modules/ssl/ssl_scache.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/modules/ssl/ssl_scache.c b/modules/ssl/ssl_scache.c index 3d231cfd89..ea944942a2 100644 --- a/modules/ssl/ssl_scache.c +++ b/modules/ssl/ssl_scache.c @@ -41,18 +41,19 @@ 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; - } + void *data; + const char *userdata_key = "ssl_scache_init"; + + /* The very first invocation of this function will be the + * post_config invocation during server startup; do nothing for + * this first (and only the first) time through, since the pool + * will be immediately cleared anyway. For every subsequent + * invocation, initialize the configured cache. */ + 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; } /* -- 2.50.1