mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 17:00:47 +00:00
wininet: Support IPv6 addresses in HTTP_ResolveName and HTTP_OpenConnection.
This commit is contained in:
parent
058e918da5
commit
481c9b895d
1 changed files with 12 additions and 2 deletions
|
@ -1448,9 +1448,13 @@ static BOOL HTTP_DealWithProxy( LPWININETAPPINFOW hIC,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#ifndef INET6_ADDRSTRLEN
|
||||
#define INET6_ADDRSTRLEN 46
|
||||
#endif
|
||||
|
||||
static BOOL HTTP_ResolveName(LPWININETHTTPREQW lpwhr)
|
||||
{
|
||||
char szaddr[32];
|
||||
char szaddr[INET6_ADDRSTRLEN];
|
||||
LPWININETHTTPSESSIONW lpwhs = lpwhr->lpHttpSession;
|
||||
const void *addr;
|
||||
|
||||
|
@ -1472,6 +1476,9 @@ static BOOL HTTP_ResolveName(LPWININETHTTPREQW lpwhr)
|
|||
case AF_INET:
|
||||
addr = &((struct sockaddr_in *)&lpwhs->socketAddress)->sin_addr;
|
||||
break;
|
||||
case AF_INET6:
|
||||
addr = &((struct sockaddr_in6 *)&lpwhs->socketAddress)->sin6_addr;
|
||||
break;
|
||||
default:
|
||||
WARN("unsupported family %d\n", lpwhs->socketAddress.ss_family);
|
||||
INTERNET_SetLastError(ERROR_INTERNET_NAME_NOT_RESOLVED);
|
||||
|
@ -4117,7 +4124,7 @@ static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr)
|
|||
BOOL bSuccess = FALSE;
|
||||
LPWININETHTTPSESSIONW lpwhs;
|
||||
LPWININETAPPINFOW hIC = NULL;
|
||||
char szaddr[32];
|
||||
char szaddr[INET6_ADDRSTRLEN];
|
||||
const void *addr;
|
||||
|
||||
TRACE("-->\n");
|
||||
|
@ -4144,6 +4151,9 @@ static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr)
|
|||
case AF_INET:
|
||||
addr = &((struct sockaddr_in *)&lpwhs->socketAddress)->sin_addr;
|
||||
break;
|
||||
case AF_INET6:
|
||||
addr = &((struct sockaddr_in6 *)&lpwhs->socketAddress)->sin6_addr;
|
||||
break;
|
||||
default:
|
||||
WARN("unsupported family %d\n", lpwhs->socketAddress.ss_family);
|
||||
INTERNET_SetLastError(ERROR_INTERNET_NAME_NOT_RESOLVED);
|
||||
|
|
Loading…
Reference in a new issue