Mercurial > hg > nginx
diff src/stream/ngx_stream_core_module.c @ 6379:cf5e822cf470
Dynamic modules: changed ngx_modules to cycle->modules.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 04 Feb 2016 18:30:21 +0300 |
parents | 2a621245f4cf |
children | 8f038068f4bc |
line wrap: on
line diff
--- a/src/stream/ngx_stream_core_module.c +++ b/src/stream/ngx_stream_core_module.c @@ -199,12 +199,12 @@ ngx_stream_core_server(ngx_conf_t *cf, n return NGX_CONF_ERROR; } - for (m = 0; ngx_modules[m]; m++) { - if (ngx_modules[m]->type != NGX_STREAM_MODULE) { + for (m = 0; cf->cycle->modules[m]; m++) { + if (cf->cycle->modules[m]->type != NGX_STREAM_MODULE) { continue; } - module = ngx_modules[m]->ctx; + module = cf->cycle->modules[m]->ctx; if (module->create_srv_conf) { mconf = module->create_srv_conf(cf); @@ -212,7 +212,7 @@ ngx_stream_core_server(ngx_conf_t *cf, n return NGX_CONF_ERROR; } - ctx->srv_conf[ngx_modules[m]->ctx_index] = mconf; + ctx->srv_conf[cf->cycle->modules[m]->ctx_index] = mconf; } }