diff options
Diffstat (limited to 'src/mail/ngx_mail.c')
| -rw-r--r-- | src/mail/ngx_mail.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/mail/ngx_mail.c b/src/mail/ngx_mail.c index 962ae8be5..7524bee79 100644 --- a/src/mail/ngx_mail.c +++ b/src/mail/ngx_mail.c @@ -91,14 +91,7 @@ ngx_mail_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) /* count the number of the mail modules and set up their indices */ - ngx_mail_max_module = 0; - for (m = 0; ngx_modules[m]; m++) { - if (ngx_modules[m]->type != NGX_MAIL_MODULE) { - continue; - } - - ngx_modules[m]->ctx_index = ngx_mail_max_module++; - } + ngx_mail_max_module = ngx_count_modules(cf->cycle, NGX_MAIL_MODULE); /* the mail main_conf context, it is the same in the all mail contexts */ |
