comparison src/core/ngx_inet.c @ 488:829f9a66a659 NGINX_0_7_56

nginx 0.7.56 *) Feature: nginx/Windows supports IPv6 in a "listen" directive of the HTTP module. *) Bugfix: in ngx_http_image_filter_module.
author Igor Sysoev <http://sysoev.ru>
date Mon, 11 May 2009 00:00:00 +0400
parents a8424ffa495c
children 98143f74eb3d
comparison
equal deleted inserted replaced
487:e98b980b4fe7 488:829f9a66a659
647 return NGX_ERROR; 647 return NGX_ERROR;
648 } 648 }
649 649
650 (void) ngx_cpystrn(p, host, len); 650 (void) ngx_cpystrn(p, host, len);
651 651
652 #if (NGX_WIN32)
653
654 rc = WSAStringToAddress((char *) p, AF_INET6, NULL,
655 (SOCKADDR *) sin6, &u->socklen);
656 rc = !rc;
657
658 if (u->port) {
659 sin6->sin6_port = htons(u->port);
660 }
661
662 #else
663
652 rc = inet_pton(AF_INET6, (const char *) p, &sin6->sin6_addr); 664 rc = inet_pton(AF_INET6, (const char *) p, &sin6->sin6_addr);
665
666 #endif
653 667
654 ngx_free(p); 668 ngx_free(p);
655 669
656 if (rc == 0) { 670 if (rc == 0) {
657 u->err = "invalid IPv6 address"; 671 u->err = "invalid IPv6 address";