comparison 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
comparison
equal deleted inserted replaced
6378:0f203a2af17c 6379:cf5e822cf470
197 sizeof(void *) * ngx_stream_max_module); 197 sizeof(void *) * ngx_stream_max_module);
198 if (ctx->srv_conf == NULL) { 198 if (ctx->srv_conf == NULL) {
199 return NGX_CONF_ERROR; 199 return NGX_CONF_ERROR;
200 } 200 }
201 201
202 for (m = 0; ngx_modules[m]; m++) { 202 for (m = 0; cf->cycle->modules[m]; m++) {
203 if (ngx_modules[m]->type != NGX_STREAM_MODULE) { 203 if (cf->cycle->modules[m]->type != NGX_STREAM_MODULE) {
204 continue; 204 continue;
205 } 205 }
206 206
207 module = ngx_modules[m]->ctx; 207 module = cf->cycle->modules[m]->ctx;
208 208
209 if (module->create_srv_conf) { 209 if (module->create_srv_conf) {
210 mconf = module->create_srv_conf(cf); 210 mconf = module->create_srv_conf(cf);
211 if (mconf == NULL) { 211 if (mconf == NULL) {
212 return NGX_CONF_ERROR; 212 return NGX_CONF_ERROR;
213 } 213 }
214 214
215 ctx->srv_conf[ngx_modules[m]->ctx_index] = mconf; 215 ctx->srv_conf[cf->cycle->modules[m]->ctx_index] = mconf;
216 } 216 }
217 } 217 }
218 218
219 /* the server configuration context */ 219 /* the server configuration context */
220 220