Mercurial > hg > nginx
comparison src/mail/ngx_mail.c @ 4853:0b0ddfdbdd7b stable-1.2
Merge of r4813, r4814, r4818, r4819, r4820, r4823: mail fixes.
*) Corrected the directive name in the ngx_mail_auth_http_module
error message.
*) Don't let the well-known port in the "listen" directive to
override the already set "protocol".
*) Fixed sorting of listen addresses (ticket #187). For http module
this problem was already fixed in r4756.
*) Removed a stale "AF_INET only" comment. IPv6 client connections
in mail modules have been supported since r2856.
*) Fixed handling of AF_UNIX addresses in "listen". This makes AF_UNIX
addresses in mail officially supported.
*) Whitespace fix.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 24 Sep 2012 18:58:13 +0000 |
parents | d620f497c50f |
children |
comparison
equal
deleted
inserted
replaced
4852:9be0b6b749ae | 4853:0b0ddfdbdd7b |
---|---|
261 sin6 = (struct sockaddr_in6 *) sa; | 261 sin6 = (struct sockaddr_in6 *) sa; |
262 p = sin6->sin6_port; | 262 p = sin6->sin6_port; |
263 break; | 263 break; |
264 #endif | 264 #endif |
265 | 265 |
266 #if (NGX_HAVE_UNIX_DOMAIN) | |
267 case AF_UNIX: | |
268 p = 0; | |
269 break; | |
270 #endif | |
271 | |
266 default: /* AF_INET */ | 272 default: /* AF_INET */ |
267 sin = (struct sockaddr_in *) sa; | 273 sin = (struct sockaddr_in *) sa; |
268 p = sin->sin_port; | 274 p = sin->sin_port; |
269 break; | 275 break; |
270 } | 276 } |
537 if (first->wildcard) { | 543 if (first->wildcard) { |
538 /* a wildcard must be the last resort, shift it to the end */ | 544 /* a wildcard must be the last resort, shift it to the end */ |
539 return 1; | 545 return 1; |
540 } | 546 } |
541 | 547 |
548 if (second->wildcard) { | |
549 /* a wildcard must be the last resort, shift it to the end */ | |
550 return -1; | |
551 } | |
552 | |
542 if (first->bind && !second->bind) { | 553 if (first->bind && !second->bind) { |
543 /* shift explicit bind()ed addresses to the start */ | 554 /* shift explicit bind()ed addresses to the start */ |
544 return -1; | 555 return -1; |
545 } | 556 } |
546 | 557 |