Commit 45e3f4d2 authored by Joe Orton's avatar Joe Orton
Browse files

* 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/modules/ssl@102746 13f79535-47bb-0310-9956-ffa450edef68
parent 2f1cac2c
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -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), 
    /* 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,