Merge
authorvinnie
Thu, 15 May 2008 10:55:43 +0100
changeset 626 baf1cb906914
parent 625 ba0b63c29671 (current diff)
parent 624 e2bffc6b2d97 (diff)
child 627 384284026958
Merge
--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c	Wed May 14 18:59:18 2008 +0100
+++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c	Thu May 15 10:55:43 2008 +0100
@@ -358,15 +358,28 @@
              * See 6343810.
              */
             while (1) {
-                fd_set wr, ex;
+#ifndef USE_SELECT
+                {
+fprintf(stdout,"\nNATIVE: fd = %d] ", fd);
+                    struct pollfd pfd;
+                    pfd.fd = fd;
+                    pfd.events = POLLOUT;
 
-                FD_ZERO(&wr);
-                FD_SET(fd, &wr);
-                FD_ZERO(&ex);
-                FD_SET(fd, &ex);
+                    connect_rv = NET_Poll(&pfd, 1, -1);
+                }
+#else
+                {
+                    fd_set wr, ex;
 
-                errno = 0;
-                connect_rv = NET_Select(fd+1, 0, &wr, &ex, 0);
+                    FD_ZERO(&wr);
+                    FD_SET(fd, &wr);
+                    FD_ZERO(&ex);
+                    FD_SET(fd, &ex);
+
+                    connect_rv = NET_Select(fd+1, 0, &wr, &ex, 0);
+                }
+#endif
+
                 if (connect_rv == JVM_IO_ERR) {
                     if (errno == EINTR) {
                         continue;