From 55bef3047488310e0c8474afa5158190d8040576 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Mon, 7 Apr 2014 18:55:57 +0400 Subject: [PATCH] Win32: fixed shared ssl_session_cache (ticket #528). In a worker process shm_zone->data was set to NULL instead of a proper value extracted from shared memory. --- src/event/ngx_event_openssl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c index e7b58136b..d8dd3d358 100644 --- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -1804,13 +1804,13 @@ ngx_ssl_session_cache_init(ngx_shm_zone_t *shm_zone, void *data) return NGX_OK; } + shpool = (ngx_slab_pool_t *) shm_zone->shm.addr; + if (shm_zone->shm.exists) { - shm_zone->data = data; + shm_zone->data = shpool->data; return NGX_OK; } - shpool = (ngx_slab_pool_t *) shm_zone->shm.addr; - cache = ngx_slab_alloc(shpool, sizeof(ngx_ssl_session_cache_t)); if (cache == NULL) { return NGX_ERROR;