comparison src/solaris/native/sun/nio/ch/Net.c @ 353:5996f2328c7c

Fixes/updates for nio2-b92 - NPE in multicast sample when network interface not specified - IPv6 hop count uses route default (linux only)) - DatagramChannel#getOption throws UOE instead of IAE for bogus option - CREATE and TRUNCATE combination of open options does not work (win only) - setOwner fails to set owner when privileges available (win only)) - moveTo across volumes or copyTo preserving attributes didn't copy security attrs (win only) - Directory attributes not copied correctly when moving/copying across fs (solaris/linux only) - ACL set/get throws confusing message when NFSv4 ACLs not supported on fs (solaris only) - Timer thread visible to user supplied ThreadFactory - Provider permission checks insufficient - NamedAttributeView#read missing IAE - NamedAttributeView#read didn't handle read-only buffer (linux only) - NamedAttributeView confusing exception when attribute name larger than max (linux only) - NamedAttributeView missing null check (win only) - Unable to access named attributes of sym links (win only) - ArrayIndexOutOfBounds when name empty (solaris only) - Eliminate IoFuture - CompletionHandler should define three methods - Clarify how cancellation should behave - Remove bogus UOE from attribute package - Path missing getFileSystem method - Part one of updates to AsynchronousChannelGroup
author alanb
date Tue, 24 Jun 2008 20:05:07 +0100
parents 939fd6c3984a
children 89772d193b62
comparison
equal deleted inserted replaced
1:5fcb1046191c 2:2e25b4e3acb5
170 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&arg, 170 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&arg,
171 sizeof(arg)) < 0) { 171 sizeof(arg)) < 0) {
172 JNU_ThrowByNameWithLastError(env, 172 JNU_ThrowByNameWithLastError(env,
173 JNU_JAVANETPKG "SocketException", 173 JNU_JAVANETPKG "SocketException",
174 "sun.nio.ch.Net.setIntOption"); 174 "sun.nio.ch.Net.setIntOption");
175 close(fd);
176 return -1;
175 } 177 }
176 } 178 }
179 #ifdef __linux__
180 /* By default, Linux uses the route default */
181 if (domain == AF_INET6 && type == SOCK_DGRAM) {
182 int arg = 1;
183 if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &arg,
184 sizeof(arg)) < 0) {
185 JNU_ThrowByNameWithLastError(env,
186 JNU_JAVANETPKG "SocketException",
187 "sun.nio.ch.Net.setIntOption");
188 close(fd);
189 return -1;
190 }
191 }
192 #endif
177 return fd; 193 return fd;
178 } 194 }
179 195
180 JNIEXPORT void JNICALL 196 JNIEXPORT void JNICALL
181 Java_sun_nio_ch_Net_bind0(JNIEnv *env, jclass clazz, jboolean preferIPv6, 197 Java_sun_nio_ch_Net_bind0(JNIEnv *env, jclass clazz, jboolean preferIPv6,