]> granicus.if.org Git - apache/commitdiff
* modules/ssl/ssl_scache.c (ssl_scache_init): Reformat
authorJoe Orton <jorton@apache.org>
Mon, 25 Feb 2008 10:56:37 +0000 (10:56 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 25 Feb 2008 10:56:37 +0000 (10:56 +0000)
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

index 3d231cfd8946dd42cda57705f7da24b0ae839b7b..ea944942a2eebee4bb015462a4528552f6f7ac50 100644 (file)
@@ -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;
     }
 
     /*