diff src/core/ngx_cycle.c @ 993:1b9a4d92173f

pass the inherited shm_zone data
author Igor Sysoev <igor@sysoev.ru>
date Tue, 09 Jan 2007 15:59:20 +0000
parents cb876bced0c2
children 151ae1691971
line wrap: on
line diff
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -402,6 +402,13 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
 
             if (shm_zone[i].shm.size == oshm_zone[n].shm.size) {
                 shm_zone[i].shm.addr = oshm_zone[n].shm.addr;
+
+                if (shm_zone[i].init(&shm_zone[i], oshm_zone[n].data)
+                    != NGX_OK)
+                {
+                    goto failed;
+                }
+
                 goto found;
             }
 
@@ -446,7 +453,7 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
 
         ngx_slab_init(shpool);
 
-        if (shm_zone[i].init(&shm_zone[i]) != NGX_OK) {
+        if (shm_zone[i].init(&shm_zone[i], NULL) != NGX_OK) {
             goto failed;
         }