< prev index next >

test/jdk/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java

Print this page
rev 59105 : imported patch corelibs

@@ -114,15 +114,12 @@
             smc.setOption(SO_SNDBUF, 16*1024, null);
             smc.setOption(SO_RCVBUF, 16*1024, null);
 
             checkOption(smc, SO_LINGER, -1);  /* default should be negative */
 
-            /* Setting SO_LINGER not support for one-to-many on Solaris */
-            if (!"SunOS".equals(osName)) {
                 smc.setOption(SO_LINGER, 2000, null);
                 checkOption(smc, SO_LINGER, 2000);
-            }
 
             /* SCTP_PRIMARY_ADDR */
             sctpPrimaryAddr();
 
             /* NullPointerException */

@@ -193,18 +190,10 @@
         for (Iterator<SocketAddress> it = remoteAddresses.iterator(); it.hasNext(); ) {
             InetSocketAddress addr = (InetSocketAddress)it.next();
             debug("\t" + addr);
         }
 
-        /* retrieval of SCTP_PRIMARY_ADDR is not supported on Solaris */
-        if ("SunOS".equals(osName)) {
-            /* For now do not set this option. There is a bug on Solaris 10 pre Update 5
-             * where setting this option returns Invalid argument */
-            //debug("Set SCTP_PRIMARY_ADDR with " + addrToSet);
-            //smc.setOption(SCTP_PRIMARY_ADDR, addrToSet, assoc);
-            return;
-        } else { /* Linux */
             SocketAddress primaryAddr = smc.getOption(SCTP_PRIMARY_ADDR, assoc);
             System.out.println("SCTP_PRIMARY_ADDR returned: " + primaryAddr);
             /* Verify that this is one of the remote addresses */
             check(remoteAddresses.contains(primaryAddr), "SCTP_PRIMARY_ADDR returned bogus address!");
 

@@ -215,11 +204,10 @@
                 System.out.println("SCTP_PRIMARY_ADDR set to    : " + addrToSet);
                 primaryAddr = smc.getOption(SCTP_PRIMARY_ADDR, assoc);
                 System.out.println("SCTP_PRIMARY_ADDR returned  : " + primaryAddr);
                 check(addrToSet.equals(primaryAddr), "SCTP_PRIMARY_ADDR not set correctly");
             }
-        }
         smc.close();
         peerChannel.close();
     }
 
     class SOTNotificationHandler extends AbstractNotificationHandler<Object>
< prev index next >