mirror of
https://github.com/nginx/nginx.git
synced 2025-07-31 10:36:14 +08:00
mail_core: don't let the well-known port in the "listen" directive to
override the already set "protocol".
This commit is contained in:
parent
89ad2e91e5
commit
9aac01a76e
@ -378,21 +378,23 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||||||
ls->ipv6only = 1;
|
ls->ipv6only = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (m = 0; ngx_modules[m]; m++) {
|
if (cscf->protocol == NULL) {
|
||||||
if (ngx_modules[m]->type != NGX_MAIL_MODULE) {
|
for (m = 0; ngx_modules[m]; m++) {
|
||||||
continue;
|
if (ngx_modules[m]->type != NGX_MAIL_MODULE) {
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
module = ngx_modules[m]->ctx;
|
|
||||||
|
module = ngx_modules[m]->ctx;
|
||||||
if (module->protocol == NULL) {
|
|
||||||
continue;
|
if (module->protocol == NULL) {
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
for (i = 0; module->protocol->port[i]; i++) {
|
|
||||||
if (module->protocol->port[i] == u.port) {
|
for (i = 0; module->protocol->port[i]; i++) {
|
||||||
cscf->protocol = module->protocol;
|
if (module->protocol->port[i] == u.port) {
|
||||||
break;
|
cscf->protocol = module->protocol;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user