diff --git a/src/solaris/native/sun/nio/ch/SctpNet.c b/src/solaris/native/sun/nio/ch/SctpNet.c index 8a27807c5990c994469cee83c902f2d633763b7b..f58157f1fae75769222c257fafd8387f1df8985e 100644 --- a/src/solaris/native/sun/nio/ch/SctpNet.c +++ b/src/solaris/native/sun/nio/ch/SctpNet.c @@ -484,7 +484,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_setIntOption0 arglen = sizeof(arg); } - if (setsockopt(fd, klevel, kopt, parg, arglen) < 0) { + if (NET_SetSockOpt(fd, klevel, kopt, parg, arglen) < 0) { JNU_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException", "sun_nio_ch_SctpNet.setIntOption0"); } @@ -517,7 +517,7 @@ JNIEXPORT int JNICALL Java_sun_nio_ch_SctpNet_getIntOption0 arglen = sizeof(result); } - if (getsockopt(fd, klevel, kopt, arg, &arglen) < 0) { + if (NET_GetSockOpt(fd, klevel, kopt, arg, &arglen) < 0) { JNU_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException", "sun.nio.ch.Net.getIntOption"); return -1; diff --git a/test/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java b/test/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java index d5715b17198fa10213a1b2beb88e4e79f5ee2476..f5814a17bc5c805f82a2710cbed67b5c250eac0c 100644 --- a/test/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java +++ b/test/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java @@ -104,7 +104,9 @@ public class SocketOptionTests { sc.setOption(SCTP_NODELAY, true); checkOption(sc, SCTP_NODELAY, true); sc.setOption(SO_SNDBUF, 16*1024); + checkOption(sc, SO_SNDBUF, 16*1024); sc.setOption(SO_RCVBUF, 16*1024); + checkOption(sc, SO_RCVBUF, 16*1024); checkOption(sc, SO_LINGER, -1); /* default should be negative */ sc.setOption(SO_LINGER, 2000); checkOption(sc, SO_LINGER, 2000);