mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
Mail: fixed the duplicate listen address detection.
This commit is contained in:
parent
0b30dec0d3
commit
2b7e167dbb
@ -336,7 +336,7 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||||||
off = offsetof(struct sockaddr_in6, sin6_addr);
|
off = offsetof(struct sockaddr_in6, sin6_addr);
|
||||||
len = 16;
|
len = 16;
|
||||||
sin6 = (struct sockaddr_in6 *) sa;
|
sin6 = (struct sockaddr_in6 *) sa;
|
||||||
port = sin6->sin6_port;
|
port = ntohs(sin6->sin6_port);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -352,7 +352,7 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||||||
off = offsetof(struct sockaddr_in, sin_addr);
|
off = offsetof(struct sockaddr_in, sin_addr);
|
||||||
len = 4;
|
len = 4;
|
||||||
sin = (struct sockaddr_in *) sa;
|
sin = (struct sockaddr_in *) sa;
|
||||||
port = sin->sin_port;
|
port = ntohs(sin->sin_port);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user