You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2004/02/22 11:23:01 UTC
cvs commit: httpd-2.0/modules/ssl ssl_scache_shmcb.c
jorton 2004/02/22 02:23:01
Modified: modules/ssl ssl_scache_shmcb.c
Log:
* modules/ssl/ssl_scache_shmcb.c (ssl_scache_shmcb_init): Use an
anonymous shm segment by default or fall back on name-based shm.
Revision Changes Path
1.24 +13 -4 httpd-2.0/modules/ssl/ssl_scache_shmcb.c
Index: ssl_scache_shmcb.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_scache_shmcb.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -w -d -u -r1.23 -r1.24
--- ssl_scache_shmcb.c 9 Feb 2004 20:29:22 -0000 1.23
+++ ssl_scache_shmcb.c 22 Feb 2004 10:23:01 -0000 1.24
@@ -339,10 +339,19 @@
ssl_die();
}
- if ((rv = apr_shm_create(&(mc->pSessionCacheDataMM),
+ /* Use anonymous shm by default, fall back on name-based. */
+ rv = apr_shm_create(&(mc->pSessionCacheDataMM),
+ mc->nSessionCacheDataSize,
+ NULL, mc->pPool);
+
+ if (APR_STATUS_IS_ENOTIMPL(rv)) {
+ rv = apr_shm_create(&(mc->pSessionCacheDataMM),
mc->nSessionCacheDataSize,
mc->szSessionCacheDataFile,
- mc->pPool)) != APR_SUCCESS) {
+ mc->pPool);
+ }
+
+ if (rv != APR_SUCCESS) {
char buf[100];
ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Cannot allocate shared memory: (%d)%s", rv,