diff options
author | Yi Kong <yikong@google.com> | 2016-12-13 15:15:25 +0000 |
---|---|---|
committer | Yi Kong <yikong@google.com> | 2016-12-15 15:45:00 +0000 |
commit | 0d4a60083ee1d7e713f09bd78c22e771030e1a9d (patch) | |
tree | d973e3f47454ee2bf7b9463dd32c835da2ebee07 /annotations/generate_annotated_java_files.py | |
parent | c6c543e1738250d87ed2bdcfe8fe8e6e3f5c0245 (diff) |
Revert "Revert "recvfrom should set srcAddress for empty packets""
This reverts commit 94767318786fec526121498a4aba2f1dc07dd3c8.
recvfrom(2) may return 0 if:
* packet received has zero length
* the socket has performed orderly shutdown
Previous Libcore change 6e888e9 tried to handle the second case but
broke the first case and never fills in srcAddress for empty packets.
Added a condition to only fill in srcAddress if the sockaddr is an
InetSocketAddress.
Test: libcore.io.OsTest
Bug: 33483694
Bug: 27294715
Bug: 27233089
Change-Id: I50847bf813e20b02f5ac88d664e77622c28f3704
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions