< prev index next >

src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c

Print this page
rev 15720 : 8166850: No runtime error expected after calling NET_MapSocketOption

*** 1300,1310 **** /* * Sets the multicast loopback mode. */ static void setMulticastLoopbackMode(JNIEnv *env, jobject this, int fd, ! jint opt, jobject value) { #ifdef AF_INET6 #ifdef __linux__ mcast_set_loop_v4(env, this, fd, value); if (ipv6_available()) { if ((*env)->ExceptionCheck(env)){ --- 1300,1310 ---- /* * Sets the multicast loopback mode. */ static void setMulticastLoopbackMode(JNIEnv *env, jobject this, int fd, ! jint opt, jobject value) { #ifdef AF_INET6 #ifdef __linux__ mcast_set_loop_v4(env, this, fd, value); if (ipv6_available()) { if ((*env)->ExceptionCheck(env)){
*** 1328,1341 **** * Class: java_net_PlainDatagramSocketImpl * Method: socketSetOption0 * Signature: (ILjava/lang/Object;)V */ JNIEXPORT void JNICALL ! Java_java_net_PlainDatagramSocketImpl_socketSetOption0(JNIEnv *env, ! jobject this, ! jint opt, ! jobject value) { int fd; int level, optname, optlen; int optval; optlen = sizeof(int); --- 1328,1340 ---- * Class: java_net_PlainDatagramSocketImpl * Method: socketSetOption0 * Signature: (ILjava/lang/Object;)V */ JNIEXPORT void JNICALL ! Java_java_net_PlainDatagramSocketImpl_socketSetOption0 ! (JNIEnv *env, jobject this, jint opt, jobject value) ! { int fd; int level, optname, optlen; int optval; optlen = sizeof(int);
*** 1378,1388 **** /* * Map the Java level socket option to the platform specific * level and option name. */ if (NET_MapSocketOption(opt, &level, &optname)) { ! JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Invalid option"); return; } switch (opt) { case java_net_SocketOptions_SO_SNDBUF : --- 1377,1387 ---- /* * Map the Java level socket option to the platform specific * level and option name. */ if (NET_MapSocketOption(opt, &level, &optname)) { ! JNU_ThrowByName(env, "java/net/SocketException", "Invalid option"); return; } switch (opt) { case java_net_SocketOptions_SO_SNDBUF :
*** 1697,1708 **** * Class: java_net_PlainDatagramSocketImpl * Method: socketGetOption * Signature: (I)Ljava/lang/Object; */ JNIEXPORT jobject JNICALL ! Java_java_net_PlainDatagramSocketImpl_socketGetOption(JNIEnv *env, jobject this, ! jint opt) { int fd; int level, optname, optlen; union { int i; char c; --- 1696,1708 ---- * Class: java_net_PlainDatagramSocketImpl * Method: socketGetOption * Signature: (I)Ljava/lang/Object; */ JNIEXPORT jobject JNICALL ! Java_java_net_PlainDatagramSocketImpl_socketGetOption ! (JNIEnv *env, jobject this, jint opt) ! { int fd; int level, optname, optlen; union { int i; char c;
*** 1749,1759 **** /* * Map the Java level socket option to the platform specific * level and option name. */ if (NET_MapSocketOption(opt, &level, &optname)) { ! JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Invalid option"); return NULL; } if (opt == java_net_SocketOptions_IP_MULTICAST_LOOP && level == IPPROTO_IP) { --- 1749,1759 ---- /* * Map the Java level socket option to the platform specific * level and option name. */ if (NET_MapSocketOption(opt, &level, &optname)) { ! JNU_ThrowByName(env, "java/net/SocketException", "Invalid option"); return NULL; } if (opt == java_net_SocketOptions_IP_MULTICAST_LOOP && level == IPPROTO_IP) {
< prev index next >