Mercurial > hg > nginx
diff src/http/ngx_http_upstream.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 | b31928ca3870 |
children | ad3f342f14ba |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c Thu Feb 04 18:30:21 2016 +0300 +++ b/src/http/ngx_http_upstream.c Thu Feb 04 18:30:21 2016 +0300 @@ -5331,12 +5331,12 @@ return NGX_CONF_ERROR; } - for (m = 0; ngx_modules[m]; m++) { - if (ngx_modules[m]->type != NGX_HTTP_MODULE) { + for (m = 0; cf->cycle->modules[m]; m++) { + if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) { continue; } - module = ngx_modules[m]->ctx; + module = cf->cycle->modules[m]->ctx; if (module->create_srv_conf) { mconf = module->create_srv_conf(cf); @@ -5344,7 +5344,7 @@ return NGX_CONF_ERROR; } - ctx->srv_conf[ngx_modules[m]->ctx_index] = mconf; + ctx->srv_conf[cf->cycle->modules[m]->ctx_index] = mconf; } if (module->create_loc_conf) { @@ -5353,7 +5353,7 @@ return NGX_CONF_ERROR; } - ctx->loc_conf[ngx_modules[m]->ctx_index] = mconf; + ctx->loc_conf[cf->cycle->modules[m]->ctx_index] = mconf; } }