File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed
Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ ngx_[% subsys %]_lua_init_worker(ngx_cycle_t *cycle)
108108
109109 conf_ctx = (ngx_[% subsys %]_conf_ctx_t *)
110110 cycle->conf_ctx[ngx_[% subsys %]_module.index];
111+ [% subsys %]_ctx.main_conf = conf_ctx->main_conf;
111112
112113[% IF http_subsys %]
113114 top_clcf = conf_ctx->loc_conf[ngx_http_core_module.ctx_index];
@@ -231,12 +232,6 @@ ngx_[% subsys %]_lua_init_worker(ngx_cycle_t *cycle)
231232 return NGX_ERROR;
232233 }
233234
234- [% subsys %]_ctx.main_conf = ngx_pcalloc(conf.pool,
235- sizeof(void *) * ngx_[% subsys %]_max_module);
236- if ([% subsys %]_ctx.main_conf == NULL) {
237- return NGX_ERROR;
238- }
239-
240235#if defined(nginx_version) && nginx_version >= 1009011
241236 modules = cycle->modules;
242237#else
@@ -250,21 +245,6 @@ ngx_[% subsys %]_lua_init_worker(ngx_cycle_t *cycle)
250245
251246 module = modules[i]->ctx;
252247
253- if (module->create_main_conf) {
254- cur = module->create_main_conf(&conf);
255- if (cur == NULL) {
256- return NGX_ERROR;
257- }
258-
259- if (ngx_modules[i]->index == ngx_[% subsys %]_lua_module.index) {
260- ngx_memcpy(cur,
261- conf_ctx->main_conf[ngx_[% subsys %]_lua_module.ctx_index],
262- sizeof(ngx_[% subsys %]_lua_main_conf_t));
263- }
264-
265- [% subsys %]_ctx.main_conf[modules[i]->ctx_index] = cur;
266- }
267-
268248 if (module->create_srv_conf) {
269249 cur = module->create_srv_conf(&conf);
270250 if (cur == NULL) {
You can’t perform that action at this time.
0 commit comments