History log of /libcore/ojluni/src/main/native/DatagramChannelImpl.c
Revision Date Author Comments
519adb2f61bb2bfa6cc993b1ca15cf7022b96697 29-Jun-2016 Shubham Ajmera <shubhamajmera@google.com> Port openJdk8 changes to sun.nio.ch package

- Moved poll event masks from AbstractPollArrayWrapper to Net.
- Removed BsdAsynchronousChannelProvider as it was not being used.
- IP_TOS can now be set for IPv6.

Change-Id: Ia17630280822fabc72f16c68891501ded73dc81c
569ec8b5f2b4cd9b914e259830b3d72225371589 27-Apr-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Made NET_SockaddrToInetAddress fail on a bad family.

NET_SockaddrToInetAddress was very lenient and
made assumption that if address was not AF_INET6
then it had to be AF_INET. Which is not true
when kernel returns address filled with random
values. Now, it should throw SocketException
in this case.

I've checked others users of NET_SockaddrToInetAddress,
and they should be fine with an exception coming from
it.

Bug: 28347599
Change-Id: I71e36c9ccb2b882f1f570c898716e88dceb7d3d2
5fb4d1c5b4e1558eeaf8d6582675ea0311bf51d8 07-Apr-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix DatagramChannelTest failures

Fix for recvfrom returning 0 after orderly shutdown didn't
take into account that sender can send empty datagram.
Added a check if the sockaddr struct is invalid before
returning when recvfrom returns 0.

Bug: 28054926
Change-Id: I4bf24407999165b86a2ef2758ded3ca82d3eb575
(cherry picked from commit 1cf88e0b56b32a7932b9d35d6f1b811bffb882d1)
1cf88e0b56b32a7932b9d35d6f1b811bffb882d1 07-Apr-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix DatagramChannelTest failures

Fix for recvfrom returning 0 after orderly shutdown didn't
take into account that sender can send empty datagram.
Added a check if the sockaddr struct is invalid before
returning when recvfrom returns 0.

Bug: 28054926
Change-Id: I4bf24407999165b86a2ef2758ded3ca82d3eb575
fb34431c917d206542a3eeb42338f8fb42fc40a9 30-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Handle recvfrom() returning 0.

According to the Linux man page, recvfrom() can return 0 when the peer has performed an orderly shutdown. This also happens when other thread uses a shutdown function on a socket file descriptor.

libcore.io.Posix#recvfrom was treating this case as a success and
was trying to interpret unpopulated sockaddr structure, throwing
IllegalArgumentException in result.

DatagramChannel#receive in same case would return
last previously seen SocketAddress.

This change makes sure that libcore.io.Posix#recvfrom and
java.nio.channels.DatagramChannel handle this case correctly.

Bug: 27294715
Bug: 27233089
Change-Id: I1ec58327efbe9ea6b8d36716756a02987e3b9897
(cherry picked from commit 6e888e9390649a9ab2557da5b28bb75be39e1b74)
6e888e9390649a9ab2557da5b28bb75be39e1b74 30-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Handle recvfrom() returning 0.

According to the Linux man page, recvfrom() can return 0 when the peer has performed an orderly shutdown. This also happens when other thread uses a shutdown function on a socket file descriptor.

libcore.io.Posix#recvfrom was treating this case as a success and
was trying to interpret unpopulated sockaddr structure, throwing
IllegalArgumentException in result.

DatagramChannel#receive in same case would return
last previously seen SocketAddress.

This change makes sure that libcore.io.Posix#recvfrom and
java.nio.channels.DatagramChannel handle this case correctly.

Bug: 27294715
Bug: 27233089
Change-Id: I1ec58327efbe9ea6b8d36716756a02987e3b9897
240109a2df3fb0699cdaf919b490d34668814a4e 21-Dec-2015 Narayan Kamath <narayan@google.com> Delete unused JNI header files.

Some of these deleted files were included in corresponding
implementation, but their inclusion was a no-op.

Change-Id: I0a786ba279d1ed5a84c9bf50297dade25a48885d
09f993b04651359387d5e089b076994bb6cccc5f 18-Nov-2015 Narayan Kamath <narayan@google.com> Turn off obfuscation.

This change also contains a revert of ac740d8c4dd4c7c17ae9d32d.

Change-Id: Ie69ec7242576af80fce4d518a504d19ddd9dc580
ac740d8c4dd4c7c17ae9d32d0989c48b93697c88 04-Sep-2015 Narayan Kamath <narayan@google.com> Track proguard mapping for sun.nio.ch / sun.net.spi

Change-Id: I1ef3fbece2b44b08e6b2b5168ed34beeee341bd8
cd47759eda5173e761c6536350225e2793374d69 13-Jul-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Add native parts of sun.nio.ch.DatagramChannelImpl

Change-Id: I7753218fde832744d46af95699a9776736e7cd50