changeset 4065:683957148bab

7032866: Problem with fix for 7030256 Reviewed-by: alanb
author michaelm
date Thu, 31 Mar 2011 17:37:11 +0100
parents e2862ac26354
children 856cc9e97aea
files src/windows/native/java/net/net_util_md.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/java/net/net_util_md.c	Wed Mar 30 21:10:02 2011 -0700
+++ b/src/windows/native/java/net/net_util_md.c	Thu Mar 31 17:37:11 2011 +0100
@@ -230,7 +230,7 @@
 jint  IPv6_supported()
 {
     SOCKET s = socket(AF_INET6, SOCK_STREAM, 0) ;
-    if (s < 0) {
+    if (s == INVALID_SOCKET) {
         return JNI_FALSE;
     }
     closesocket(s);
@@ -775,7 +775,7 @@
     DWORD b;
     struct sockaddr_in6 route;
     SOCKET fd = socket(AF_INET6, SOCK_STREAM, 0);
-    if (fd < 0) {
+    if (fd == INVALID_SOCKET) {
         return 0;
     }
 
@@ -783,7 +783,7 @@
                     (void *)target_addr, sizeof(struct sockaddr_in6),
                     (void *)&route, sizeof(struct sockaddr_in6),
                     &b, 0, 0);
-    if (ret < 0) {
+    if (ret == SOCKET_ERROR) {
         // error
         closesocket(fd);
         return 0;