httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r545608 - in /httpd/httpd/trunk/modules/ssl: ssl_engine_kernel.c ssl_private.h ssl_scache.c ssl_scache_memcache.c
Date Fri, 08 Jun 2007 20:04:35 GMT
Author: pquerna
Date: Fri Jun  8 13:04:34 2007
New Revision: 545608

URL: http://svn.apache.org/viewvc?view=rev&rev=545608
Log:
Propogate the conn_rec::pool down to ssl_scache_retrieve so that the memcache layer doesn't
'leak' into a long lived pool for temp allocations.

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c
    httpd/httpd/trunk/modules/ssl/ssl_private.h
    httpd/httpd/trunk/modules/ssl/ssl_scache.c
    httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c?view=diff&rev=545608&r1=545607&r2=545608
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c Fri Jun  8 13:04:34 2007
@@ -1670,7 +1670,7 @@
     /*
      * Try to retrieve the SSL_SESSION from the inter-process cache
      */
-    session = ssl_scache_retrieve(s, id, idlen);
+    session = ssl_scache_retrieve(s, id, idlen, conn->pool);
 
     ssl_session_log(s, "GET", id, idlen,
                     session ? "FOUND" : "MISSED",

Modified: httpd/httpd/trunk/modules/ssl/ssl_private.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_private.h?view=diff&rev=545608&r1=545607&r2=545608
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_private.h (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_private.h Fri Jun  8 13:04:34 2007
@@ -576,7 +576,7 @@
 void         ssl_scache_status_register(apr_pool_t *p);
 void         ssl_scache_kill(server_rec *);
 BOOL         ssl_scache_store(server_rec *, UCHAR *, int, time_t, SSL_SESSION *);
-SSL_SESSION *ssl_scache_retrieve(server_rec *, UCHAR *, int);
+SSL_SESSION *ssl_scache_retrieve(server_rec *, UCHAR *, int, apr_pool_t *);
 void         ssl_scache_remove(server_rec *, UCHAR *, int);
 
 char        *ssl_scache_id2sz(UCHAR *, int);
@@ -605,7 +605,7 @@
 void         ssl_scache_mc_init(server_rec *, apr_pool_t *);
 void         ssl_scache_mc_kill(server_rec *);
 BOOL         ssl_scache_mc_store(server_rec *, UCHAR *, int, time_t, SSL_SESSION *);
-SSL_SESSION *ssl_scache_mc_retrieve(server_rec *, UCHAR *, int);
+SSL_SESSION *ssl_scache_mc_retrieve(server_rec *, UCHAR *, int, apr_pool_t *);
 void         ssl_scache_mc_remove(server_rec *, UCHAR *, int);
 void         ssl_scache_mc_status(request_rec *r, int flags, apr_pool_t *pool);
 #endif

Modified: httpd/httpd/trunk/modules/ssl/ssl_scache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_scache.c?view=diff&rev=545608&r1=545607&r2=545608
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_scache.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_scache.c Fri Jun  8 13:04:34 2007
@@ -116,7 +116,8 @@
     return rv;
 }
 
-SSL_SESSION *ssl_scache_retrieve(server_rec *s, UCHAR *id, int idlen)
+SSL_SESSION *ssl_scache_retrieve(server_rec *s, UCHAR *id, int idlen,
+                                 apr_pool_t *p)
 {
     SSLModConfigRec *mc = myModConfig(s);
     SSL_SESSION *sess = NULL;
@@ -131,7 +132,7 @@
 #endif
 #ifdef HAVE_SSL_CACHE_MEMCACHE
     else if (mc->nSessionCacheMode == SSL_SCMODE_MC)
-        sess = ssl_scache_mc_retrieve(s, id, idlen);
+        sess = ssl_scache_mc_retrieve(s, id, idlen, p);
 #endif
     return sess;
 }

Modified: httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c?view=diff&rev=545608&r1=545607&r2=545608
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c Fri Jun  8 13:04:34 2007
@@ -201,7 +201,8 @@
     return TRUE;
 }
 
-SSL_SESSION *ssl_scache_mc_retrieve(server_rec *s, UCHAR *id, int idlen)
+SSL_SESSION *ssl_scache_mc_retrieve(server_rec *s, UCHAR *id, int idlen,
+                                    apr_pool_t *p)
 {
     SSL_SESSION *pSession;
     MODSSL_D2I_SSL_SESSION_CONST unsigned char *pder;
@@ -219,7 +220,7 @@
         return NULL;
     }
 
-    rv = apr_memcache_getp(memctxt,  mc->pPool, strkey,
+    rv = apr_memcache_getp(memctxt,  p, strkey,
                            (char**)&pder, &der_len, NULL);
 
     if (rv == APR_NOTFOUND) {



Mime
View raw message