< prev index next >
test/jdk/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java
Print this page
rev 59383 : [mq]: final
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -160,18 +160,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);
- //sc.setOption(SCTP_PRIMARY_ADDR, addrToSet);
- return;
- } else { /* Linux */
SocketAddress primaryAddr = sc.getOption(SCTP_PRIMARY_ADDR);
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!");
@@ -182,11 +174,10 @@
System.out.println("SCTP_PRIMARY_ADDR set to : " + addrToSet);
primaryAddr = sc.getOption(SCTP_PRIMARY_ADDR);
System.out.println("SCTP_PRIMARY_ADDR returned : " + primaryAddr);
check(addrToSet.equals(primaryAddr), "SCTP_PRIMARY_ADDR not set correctly");
}
- }
sc.close();
peerChannel.close();
}
//--------------------- Infrastructure ---------------------------
boolean debug = true;
< prev index next >