]> git.kaiwu.me - nginx.git/commitdiff
Win32: fixed shared ssl_session_cache (ticket #528).
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 7 Apr 2014 14:55:57 +0000 (18:55 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 7 Apr 2014 14:55:57 +0000 (18:55 +0400)
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

index e7b58136b58c42d00dac25c8f109d2221c357631..d8dd3d35897280647863283fe55287a90e6c53e4 100644 (file)
@@ -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;