mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
winhttp: Support IPv6 addresses in open_connection.
This commit is contained in:
parent
646b9cae80
commit
d48eade7fb
@ -710,11 +710,15 @@ BOOL WINAPI WinHttpQueryHeaders( HINTERNET hrequest, DWORD level, LPCWSTR name,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef INET6_ADDRSTRLEN
|
||||||
|
#define INET6_ADDRSTRLEN 46
|
||||||
|
#endif
|
||||||
|
|
||||||
static BOOL open_connection( request_t *request )
|
static BOOL open_connection( request_t *request )
|
||||||
{
|
{
|
||||||
connect_t *connect;
|
connect_t *connect;
|
||||||
const void *addr;
|
const void *addr;
|
||||||
char address[32];
|
char address[INET6_ADDRSTRLEN];
|
||||||
WCHAR *addressW;
|
WCHAR *addressW;
|
||||||
INTERNET_PORT port;
|
INTERNET_PORT port;
|
||||||
socklen_t slen;
|
socklen_t slen;
|
||||||
@ -733,6 +737,9 @@ static BOOL open_connection( request_t *request )
|
|||||||
case AF_INET:
|
case AF_INET:
|
||||||
addr = &((struct sockaddr_in *)&connect->sockaddr)->sin_addr;
|
addr = &((struct sockaddr_in *)&connect->sockaddr)->sin_addr;
|
||||||
break;
|
break;
|
||||||
|
case AF_INET6:
|
||||||
|
addr = &((struct sockaddr_in6 *)&connect->sockaddr)->sin6_addr;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
WARN("unsupported address family %d\n", connect->sockaddr.ss_family);
|
WARN("unsupported address family %d\n", connect->sockaddr.ss_family);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user