comparison src/event/ngx_event_openssl.c @ 5640:4c6ceca4f5f7

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 07 Apr 2014 18:55:57 +0400
parents 5024d29354f1
children 3b48f9e69e70 1ee1db30c9b9
comparison
equal deleted inserted replaced
5639:ce98b460606e 5640:4c6ceca4f5f7
1802 if (data) { 1802 if (data) {
1803 shm_zone->data = data; 1803 shm_zone->data = data;
1804 return NGX_OK; 1804 return NGX_OK;
1805 } 1805 }
1806 1806
1807 shpool = (ngx_slab_pool_t *) shm_zone->shm.addr;
1808
1807 if (shm_zone->shm.exists) { 1809 if (shm_zone->shm.exists) {
1808 shm_zone->data = data; 1810 shm_zone->data = shpool->data;
1809 return NGX_OK; 1811 return NGX_OK;
1810 } 1812 }
1811
1812 shpool = (ngx_slab_pool_t *) shm_zone->shm.addr;
1813 1813
1814 cache = ngx_slab_alloc(shpool, sizeof(ngx_ssl_session_cache_t)); 1814 cache = ngx_slab_alloc(shpool, sizeof(ngx_ssl_session_cache_t));
1815 if (cache == NULL) { 1815 if (cache == NULL) {
1816 return NGX_ERROR; 1816 return NGX_ERROR;
1817 } 1817 }