summaryrefslogtreecommitdiff
path: root/tools/integrate/PushAndroidCode.java
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2009-10-02 17:20:00 -0700
committerElliott Hughes <enh@google.com>2009-10-05 15:09:32 -0700
commit5be11d7b7cace35b473c84dc75efb8fd1c7f0981 (patch)
tree230db8aa25ea27831ca13e47b90f5eda4ba6576c /tools/integrate/PushAndroidCode.java
parent4fca3ccccdf70491f49640647a2268e08b587db6 (diff)
Refactor java_net_NetworkInterface.cpp for clarity.
All I wanted to do was remove the SOCKERR_ mess, but things got out of hand. There's still plenty of stuff that could be cleaned up, but nothing that can't wait. I'm only doing this to make things easier for the IPv6 changes. This patch: * removes the SOCKERR_ mess which was causing vague "Operation failed" IOExceptions; we now use the actual errno value of whatever caused the failure. * simplifies memory management so we don't have to do lots of cleanup on every exit from each function. * simplified fd management for the same reason. * reduces the use of the intermediate structure, going straight to Java objects in places. (This is the unfinished work: we should get rid of the intermediate representation. It's not useful.) * replaces structInToJavaAddress and structInToInetAddress with a call to the better socketAddressToInetAddress from OSNetworkSystem.cpp. * uses more intention-revealing variable and function names. * removes attempts to throw exceptions when perfectly good exceptions have already been thrown. * removes filtering of interfaces that aren't up. The RI doesn't do this filtering, there's no reason to do it, and it's always going to be a race condition anyway. * removes untrue comments. * removes a lot of inexplicably empty lines.
Diffstat (limited to 'tools/integrate/PushAndroidCode.java')
0 files changed, 0 insertions, 0 deletions