pass the inherited shm_zone data
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index ff4888a..2fd20b0 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -402,6 +402,13 @@
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_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;
}