diff options
author | Joe Orton <jorton@apache.org> | 2004-02-22 11:23:01 +0100 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2004-02-22 11:23:01 +0100 |
commit | ba689780fa6f104119d6ce9ea7a7a0bf8714fc5d (patch) | |
tree | e0efa8aaf4a135ac747f3ff937517c62e3e321a4 /modules/ssl | |
parent | Win32: Fix compile breakage (diff) | |
download | apache2-ba689780fa6f104119d6ce9ea7a7a0bf8714fc5d.tar.xz apache2-ba689780fa6f104119d6ce9ea7a7a0bf8714fc5d.zip |
* modules/ssl/ssl_scache_shmcb.c (ssl_scache_shmcb_init): Use an
anonymous shm segment by default or fall back on name-based shm.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102746 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/ssl')
-rw-r--r-- | modules/ssl/ssl_scache_shmcb.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/modules/ssl/ssl_scache_shmcb.c b/modules/ssl/ssl_scache_shmcb.c index 63cdee4c19..ee870cc101 100644 --- a/modules/ssl/ssl_scache_shmcb.c +++ b/modules/ssl/ssl_scache_shmcb.c @@ -339,10 +339,19 @@ void ssl_scache_shmcb_init(server_rec *s, apr_pool_t *p) ssl_die(); } - if ((rv = apr_shm_create(&(mc->pSessionCacheDataMM), - mc->nSessionCacheDataSize, - mc->szSessionCacheDataFile, - mc->pPool)) != APR_SUCCESS) { + /* 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); + } + + if (rv != APR_SUCCESS) { char buf[100]; ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "Cannot allocate shared memory: (%d)%s", rv, |