On 02/26/2008 05:57 PM, [EMAIL PROTECTED] wrote:
Author: jorton
Date: Tue Feb 26 08:57:56 2008
New Revision: 631297
URL: http://svn.apache.org/viewvc?rev=631297&view=rev
Log:
Session cache interface redesign, Part 6:
Move mutex handling up out of the session cache providers:
* modules/ssl/ssl_private.h (modssl_sesscache_provider): Add name and
flags fields. Define MODSSL_SESSCACHE_FLAG_NOTMPSAFE constant.
* modules/ssl/ssl_scache.c (ssl_scache_store, ssl_scache_retrieve,
ssl_scache_remove, ssl_ext_status_hook): Lock and release the mutex
around provider calls, if necessary.
* modules/ssl/ssl_engine_mutex.c (ssl_mutex_init): Do nothing if no
session cache is configured, or the session cache does not require a
mutex. Otherwise, fail if no mutex is configured and the session
cache *does* require a mutex.
(ssl_mutex_on, ssl_mutex_off): Remove checks for mutex mode;
functions now invoked only if necessary.
* modules/ssl/ssl_scache_dc.c, modules/ssl/ssl_scache_memcache: Set
name and flags fields in provider structures.
* modules/ssl/ssl_scache_shmcb.c, modules/ssl_scache_dbm.c: Remove
mutex handling through; set name and flags fields in provider
structures; mark both as unsafe for concurrent access in flags.
Modified:
httpd/httpd/trunk/modules/ssl/ssl_engine_mutex.c
httpd/httpd/trunk/modules/ssl/ssl_private.h
httpd/httpd/trunk/modules/ssl/ssl_scache.c
httpd/httpd/trunk/modules/ssl/ssl_scache_dbm.c
httpd/httpd/trunk/modules/ssl/ssl_scache_dc.c
httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c
httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c
Modified: httpd/httpd/trunk/modules/ssl/ssl_scache_dc.c
URL:
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_scache_dc.c?rev=631297&r1=631296&r2=631297&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_scache_dc.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_scache_dc.c Tue Feb 26 08:57:56 2008
@@ -171,6 +171,8 @@
}
const modssl_sesscache_provider modssl_sesscache_dc = {
+ "distcache",
+ 0,
Shouldn't we define
MODSSL_SESSCACHE_MPSAFE 0?
IMHO this would it make more readable.
Ok, I admit that 0 is no flag.
ssl_scache_dc_create,
ssl_scache_dc_init,
ssl_scache_dc_kill,
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?rev=631297&r1=631296&r2=631297&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c Tue Feb 26 08:57:56 2008
@@ -292,6 +292,8 @@
}
const modssl_sesscache_provider modssl_sesscache_mc = {
+ "memcache",
+ 0,
Same as above
Regards
RĂ¼diger