From 33d09e736418ba505911fa6e2e52f5108ff4830d Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Thu, 9 Jul 2009 10:58:15 -0700 Subject: [PATCH] wininet: Use struct sockaddr_storage in InternetCheckConnectionW. --- dlls/wininet/internet.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index b1def60ece9..ed6a70f3ba4 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -2749,16 +2749,16 @@ BOOL WINAPI InternetCheckConnectionW( LPCWSTR lpszUrl, DWORD dwFlags, DWORD dwRe if (dwFlags & FLAG_ICC_FORCE_CONNECTION) { - struct sockaddr_in sin; - socklen_t sa_len = sizeof(sin); + struct sockaddr_storage saddr; + socklen_t sa_len = sizeof(saddr); int fd; - if (!GetAddress(hostW, port, (struct sockaddr *)&sin, &sa_len)) + if (!GetAddress(hostW, port, (struct sockaddr *)&saddr, &sa_len)) goto End; - fd = socket(sin.sin_family, SOCK_STREAM, 0); + fd = socket(saddr.ss_family, SOCK_STREAM, 0); if (fd != -1) { - if (connect(fd, (struct sockaddr *)&sin, sa_len) == 0) + if (connect(fd, (struct sockaddr *)&saddr, sa_len) == 0) rc = TRUE; close(fd); }