Mercurial > hg > nginx
comparison src/http/ngx_http.c @ 4755:7ab10517ae58
Fixed sorting of listen addresses so that wildcard address is always at
the end (closes #187). Failure to do so could result in several listen
sockets to be created instead of only one listening on wildcard address.
Reported by Roman Odaisky.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 17 Jul 2012 04:47:34 +0000 |
parents | 67653855682e |
children | c0f7b94e88ba |
comparison
equal
deleted
inserted
replaced
4754:798e0377fd52 | 4755:7ab10517ae58 |
---|---|
1611 if (first->opt.wildcard) { | 1611 if (first->opt.wildcard) { |
1612 /* a wildcard address must be the last resort, shift it to the end */ | 1612 /* a wildcard address must be the last resort, shift it to the end */ |
1613 return 1; | 1613 return 1; |
1614 } | 1614 } |
1615 | 1615 |
1616 if (second->opt.wildcard) { | |
1617 /* a wildcard address must be the last resort, shift it to the end */ | |
1618 return -1; | |
1619 } | |
1620 | |
1616 if (first->opt.bind && !second->opt.bind) { | 1621 if (first->opt.bind && !second->opt.bind) { |
1617 /* shift explicit bind()ed addresses to the start */ | 1622 /* shift explicit bind()ed addresses to the start */ |
1618 return -1; | 1623 return -1; |
1619 } | 1624 } |
1620 | 1625 |