summaryrefslogtreecommitdiffhomepage
path: root/src/mail/ngx_mail.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2016-02-04 18:30:21 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2016-02-04 18:30:21 +0300
commit798833457018ee8a6274ec78e816f747361c0d47 (patch)
treea8a905538380af822e90b3fc5571de836c3b3aba /src/mail/ngx_mail.c
parent9add42c71e71c2af8e67eceeeb773d22a9cab760 (diff)
downloadnginx-798833457018ee8a6274ec78e816f747361c0d47.tar.gz
nginx-798833457018ee8a6274ec78e816f747361c0d47.tar.bz2
Dynamic modules: moved module-related stuff to separate files.
Diffstat (limited to 'src/mail/ngx_mail.c')
-rw-r--r--src/mail/ngx_mail.c9
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 */