Fixed bug #48805 (IPv6 socket transport is not working).

This commit is contained in:
Ilia Alshanetsky 2009-09-30 20:48:41 +00:00
parent 9408303390
commit d35c2b14dd
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -19,6 +19,7 @@
cannot be set"). (Felipe)
- Fixed bug #49517 (cURL's CURLOPT_FILE prevents file from being deleted after
fclose). (Ilia)
- Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)
?? ??? 2009, PHP 5.3.1RC? <- WHY IS THIS HERE? Gonna be released after 5.3.1 or what??
- Upgraded bundled sqlite to version 3.6.18. (Ilia)

View File

@ -792,7 +792,7 @@ php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short
switch (sa->sa_family) {
#if HAVE_GETADDRINFO && HAVE_IPV6
case AF_INET6:
if (bindto && strchr(bindto, ':')) {
if (!bindto || strchr(bindto, ':')) {
((struct sockaddr_in6 *)sa)->sin6_family = sa->sa_family;
((struct sockaddr_in6 *)sa)->sin6_port = htons(port);
socklen = sizeof(struct sockaddr_in6);