diff options
author | Elliott Hughes <enh@google.com> | 2011-05-10 19:33:42 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-05-11 10:21:59 -0700 |
commit | a7bb29434692e01aed843b88cd042628bab74a23 (patch) | |
tree | 20274bfd8b0b5ea45e8f89570fae6b64f0a072ea /dalvik | |
parent | 897b649912d132bef7e07c9f6612d0a3f880cec0 (diff) | |
download | libcore-a7bb29434692e01aed843b88cd042628bab74a23.zip libcore-a7bb29434692e01aed843b88cd042628bab74a23.tar.gz libcore-a7bb29434692e01aed843b88cd042628bab74a23.tar.bz2 |
Clean up the select(2) implementation.
I wasn't planning on touching this code (since I want to replace it), but the
purported "fix" for http://code.google.com/p/android/issues/detail?id=6309 was
actually a regression. The supplied test fails on the RI. This patch replaces
the bogus test with new tests, and reverts the old "fix".
This was found while trying to work out what "true" and "false" return values
from OSNetworkSystem.select are supposed to mean. This patch also switches to
a more traditional int return value.
Bug: 3107501
Change-Id: Iddce55e081d440b7eb3ddcf94db7d0739dc89c70
Diffstat (limited to 'dalvik')
-rw-r--r-- | dalvik/src/main/java/dalvik/system/BlockGuard.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/dalvik/src/main/java/dalvik/system/BlockGuard.java b/dalvik/src/main/java/dalvik/system/BlockGuard.java index f3008c8..73ec3c7 100644 --- a/dalvik/src/main/java/dalvik/system/BlockGuard.java +++ b/dalvik/src/main/java/dalvik/system/BlockGuard.java @@ -233,11 +233,9 @@ public final class BlockGuard { mNetwork.sendUrgentData(fd, value); } - public boolean select(FileDescriptor[] readFDs, FileDescriptor[] writeFDs, - int numReadable, int numWritable, long timeout, int[] flags) - throws SocketException { + public int select(FileDescriptor[] readFDs, FileDescriptor[] writeFDs, long timeout, int[] flags) throws SocketException { BlockGuard.getThreadPolicy().onNetwork(); - return mNetwork.select(readFDs, writeFDs, numReadable, numWritable, timeout, flags); + return mNetwork.select(readFDs, writeFDs, timeout, flags); } public void close(FileDescriptor aFD) throws IOException { |