summaryrefslogtreecommitdiffhomepage
path: root/src/mail/ngx_mail.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mail/ngx_mail.c')
-rw-r--r--src/mail/ngx_mail.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mail/ngx_mail.c b/src/mail/ngx_mail.c
index a39bec4a4..95d29e893 100644
--- a/src/mail/ngx_mail.c
+++ b/src/mail/ngx_mail.c
@@ -185,6 +185,8 @@ ngx_mail_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
/* init mail{} main_conf's */
+ cf->ctx = ctx;
+
if (module->init_main_conf) {
rv = module->init_main_conf(cf, ctx->main_conf[mi]);
if (rv != NGX_CONF_OK) {
@@ -197,6 +199,8 @@ ngx_mail_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
/* merge the server{}s' srv_conf's */
+ cf->ctx = cscfp[s]->ctx;
+
if (module->merge_srv_conf) {
rv = module->merge_srv_conf(cf,
ctx->srv_conf[mi],
@@ -209,8 +213,6 @@ ngx_mail_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
}
}
- /* mail{}'s cf->ctx was needed while the configuration merging */
-
*cf = pcf;