harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r720818 - /harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysock.c
Date Wed, 26 Nov 2008 11:49:27 GMT
Author: tellison
Date: Wed Nov 26 03:49:21 2008
New Revision: 720818

URL: http://svn.apache.org/viewvc?rev=720818&view=rev
Log:
Reformatting, no changes.

Modified:
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysock.c

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysock.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysock.c?rev=720818&r1=720817&r2=720818&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysock.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysock.c
Wed Nov 26 03:49:21 2008
@@ -2762,39 +2762,36 @@
   I_32 rc = 0;
   U_32 param = nonblocking;
 
-  /* If both the IPv4 and IPv6 socket are open then we want to set the option on both.  If
only one is open,
-     then we set it just on that one.  */
-
-  if (socketP->flags & SOCKET_IPV4_OPEN_MASK)
-    {
-      rc = ioctlsocket (socketP->ipv4, FIONBIO, &param);
-    }
-
-  if (rc == 0 && socketP->flags & SOCKET_IPV6_OPEN_MASK)
-    {
-      rc = ioctlsocket (socketP->ipv6, FIONBIO, &param);
-    }
-
-  if (rc != 0)
-    {
-      rc = WSAGetLastError ();
-      HYSOCKDEBUG ("<set_nonblocking (for bool) failed, err=%d>\n", rc);
-      switch (rc)
-	{
-	case WSAEINVAL:
-	  return portLibrary->error_set_last_error (portLibrary, rc,
-						    HYPORT_ERROR_SOCKET_OPTARGSINVALID);
-	default:
-	  return portLibrary->error_set_last_error (portLibrary, rc,
-						    findError (rc));
-	}
+  /* If both the IPv4 and IPv6 socket are open then we want to set the option on both.
+   * If only one is open, then we set it just on that one.
+   */
+  if (socketP->flags & SOCKET_IPV4_OPEN_MASK) {
+    rc = ioctlsocket (socketP->ipv4, FIONBIO, &param);
+  }
+
+  if (rc == 0 && socketP->flags & SOCKET_IPV6_OPEN_MASK) {
+    rc = ioctlsocket (socketP->ipv6, FIONBIO, &param);
+  }
+
+  if (rc != 0) {
+    rc = WSAGetLastError ();
+    HYSOCKDEBUG ("<set_nonblocking (for bool) failed, err=%d>\n", rc);
+    switch (rc) {
+      case WSAEINVAL :
+	      return portLibrary->error_set_last_error (portLibrary, rc,
+          HYPORT_ERROR_SOCKET_OPTARGSINVALID);
+        default :
+	        return portLibrary->error_set_last_error (portLibrary, rc,
+            findError (rc));
     }
+  }
 
   return rc;
 }
 
 #undef CDEV_CURRENT_FUNCTION
 
+
 #define CDEV_CURRENT_FUNCTION hysock_setflag
 /**
  * Ensure the flag designated is set in the argument.  This is used to construct arguments
for the 



Mime
View raw message