< prev index next >

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

Print this page
rev 59105 : imported patch corelibs

*** 25,38 **** #include <errno.h> #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> - #if defined(__solaris__) - #include <sys/filio.h> - #endif - #include "net_util.h" #include "java_net_PlainDatagramSocketImpl.h" #include "java_net_InetAddress.h" #include "java_net_NetworkInterface.h" --- 25,34 ----
*** 50,65 **** #ifndef IP_MULTICAST_ALL #define IP_MULTICAST_ALL 49 #endif #endif // __linux__ - #ifdef __solaris__ - #ifndef BSD_COMP - #define BSD_COMP - #endif - #endif - #ifndef IPTOS_TOS_MASK #define IPTOS_TOS_MASK 0x1e #endif #ifndef IPTOS_PREC_MASK #define IPTOS_PREC_MASK 0xe0 --- 46,55 ----
*** 496,513 **** } n = NET_RecvFrom(fd, buf, 1, MSG_PEEK, &rmtaddr.sa, &slen); if (n == -1) { - - #ifdef __solaris__ - if (errno == ECONNREFUSED) { - int orig_errno = errno; - recv(fd, buf, 1, 0); - errno = orig_errno; - } - #endif if (errno == ECONNREFUSED) { JNU_ThrowByName(env, JNU_JAVANETPKG "PortUnreachableException", "ICMP Port Unreachable"); } else { if (errno == EBADF) { --- 486,495 ----
*** 630,647 **** /* truncate the data if the packet's length is too small */ if (n > packetBufferLen) { n = packetBufferLen; } if (n == -1) { - - #ifdef __solaris__ - if (errno == ECONNREFUSED) { - int orig_errno = errno; - (void) recv(fd, fullPacket, 1, 0); - errno = orig_errno; - } - #endif (*env)->SetIntField(env, packet, dp_offsetID, 0); (*env)->SetIntField(env, packet, dp_lengthID, 0); if (errno == ECONNREFUSED) { JNU_ThrowByName(env, JNU_JAVANETPKG "PortUnreachableException", "ICMP Port Unreachable"); --- 612,621 ----
< prev index next >