Mercurial > hg > nginx
comparison src/mail/ngx_mail.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 | 0f203a2af17c |
children | c90cf79d0e1d |
comparison
equal
deleted
inserted
replaced
6378:0f203a2af17c | 6379:cf5e822cf470 |
---|---|
116 | 116 |
117 /* | 117 /* |
118 * create the main_conf's and the null srv_conf's of the all mail modules | 118 * create the main_conf's and the null srv_conf's of the all mail modules |
119 */ | 119 */ |
120 | 120 |
121 for (m = 0; ngx_modules[m]; m++) { | 121 for (m = 0; cf->cycle->modules[m]; m++) { |
122 if (ngx_modules[m]->type != NGX_MAIL_MODULE) { | 122 if (cf->cycle->modules[m]->type != NGX_MAIL_MODULE) { |
123 continue; | 123 continue; |
124 } | 124 } |
125 | 125 |
126 module = ngx_modules[m]->ctx; | 126 module = cf->cycle->modules[m]->ctx; |
127 mi = ngx_modules[m]->ctx_index; | 127 mi = cf->cycle->modules[m]->ctx_index; |
128 | 128 |
129 if (module->create_main_conf) { | 129 if (module->create_main_conf) { |
130 ctx->main_conf[mi] = module->create_main_conf(cf); | 130 ctx->main_conf[mi] = module->create_main_conf(cf); |
131 if (ctx->main_conf[mi] == NULL) { | 131 if (ctx->main_conf[mi] == NULL) { |
132 return NGX_CONF_ERROR; | 132 return NGX_CONF_ERROR; |
160 /* init mail{} main_conf's, merge the server{}s' srv_conf's */ | 160 /* init mail{} main_conf's, merge the server{}s' srv_conf's */ |
161 | 161 |
162 cmcf = ctx->main_conf[ngx_mail_core_module.ctx_index]; | 162 cmcf = ctx->main_conf[ngx_mail_core_module.ctx_index]; |
163 cscfp = cmcf->servers.elts; | 163 cscfp = cmcf->servers.elts; |
164 | 164 |
165 for (m = 0; ngx_modules[m]; m++) { | 165 for (m = 0; cf->cycle->modules[m]; m++) { |
166 if (ngx_modules[m]->type != NGX_MAIL_MODULE) { | 166 if (cf->cycle->modules[m]->type != NGX_MAIL_MODULE) { |
167 continue; | 167 continue; |
168 } | 168 } |
169 | 169 |
170 module = ngx_modules[m]->ctx; | 170 module = cf->cycle->modules[m]->ctx; |
171 mi = ngx_modules[m]->ctx_index; | 171 mi = cf->cycle->modules[m]->ctx_index; |
172 | 172 |
173 /* init mail{} main_conf's */ | 173 /* init mail{} main_conf's */ |
174 | 174 |
175 cf->ctx = ctx; | 175 cf->ctx = ctx; |
176 | 176 |