[nginx] svn commit: r4626 - trunk/src/http
ru at nginx.com
ru at nginx.com
Mon May 14 13:15:22 UTC 2012
Author: ru
Date: 2012-05-14 13:15:22 +0000 (Mon, 14 May 2012)
New Revision: 4626
URL: http://trac.nginx.org/nginx/changeset/4626/nginx
Log:
Fixed compilation warning introduced in r4624.
Modified:
trunk/src/http/ngx_http_core_module.c
Modified: trunk/src/http/ngx_http_core_module.c
===================================================================
--- trunk/src/http/ngx_http_core_module.c 2012-05-14 12:41:03 UTC (rev 4625)
+++ trunk/src/http/ngx_http_core_module.c 2012-05-14 13:15:22 UTC (rev 4626)
@@ -2715,21 +2715,29 @@
family = addr->sockaddr->sa_family;
- if (family == AF_INET) {
- inaddr = &((struct sockaddr_in *) addr->sockaddr)->sin_addr.s_addr;
- }
+ switch (family) {
#if (NGX_HAVE_INET6)
- else if (family == AF_INET6) {
+ case AF_INET6:
inaddr6 = &((struct sockaddr_in6 *) addr->sockaddr)->sin6_addr;
if (IN6_IS_ADDR_V4MAPPED(inaddr6)) {
family = AF_INET;
inaddr = (in_addr_t *) &inaddr6->s6_addr[12];
}
- }
+
+ break;
#endif
+#if (NGX_HAVE_UNIX_DOMAIN)
+ case AF_UNIX:
+ break;
+#endif
+
+ default: /* AF_INET */
+ inaddr = &((struct sockaddr_in *) addr->sockaddr)->sin_addr.s_addr;
+ }
+
for (cidr = proxies->elts, i = 0; i < proxies->nelts; i++) {
if (cidr[i].family != family) {
goto next;
More information about the nginx-devel
mailing list