Commit ba17b532 authored by Yi Kong's avatar Yi Kong
Browse files

Revert "Revert "Move PlainDatagramSocketImpl away from JNI""

Fixed a issue introduced as part of Libcore change 5e0df135, that caused
calling  DatagramSocket.receive() with a reused DatagramPacket to fail.
This was due to calling system recvfrom(2) with packet's content length
instead of its buffer length.

This reverts commit fba26224 and fixes
the above issue.

org.apache.harmony.tests.java.net.DatagramSocketTest#testReceiveTwice is
a regression test.

Test: Manual testing
Test: org.apache.harmony.tests.java.net.DatagramSocketTest#testReceiveTwice
Test: CtsLibcoreTestCases
Bug: 33957878
Change-Id: I64daaf6cf099e9af6bdee56f29da48627111ae25
parent a2a43b61
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment