Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1865)

Unified Diff: dart/runtime/bin/socket_android.cc

Issue 60293003: Version 0.8.10.5 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/runtime/bin/socket.cc ('k') | dart/runtime/bin/socket_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/bin/socket_android.cc
===================================================================
--- dart/runtime/bin/socket_android.cc (revision 29908)
+++ dart/runtime/bin/socket_android.cc (working copy)
@@ -136,7 +136,7 @@
}
-bool Socket::GetRemotePeer(intptr_t fd, char *host, intptr_t *port) {
+SocketAddress* Socket::GetRemotePeer(intptr_t fd, intptr_t* port) {
ASSERT(fd >= 0);
RawAddr raw;
socklen_t size = sizeof(raw);
@@ -148,23 +148,10 @@
char error_message[kBufferSize];
strerror_r(errno, error_message, kBufferSize);
Log::PrintErr("Error getpeername: %s\n", error_message);
- return false;
+ return NULL;
}
- if (TEMP_FAILURE_RETRY(getnameinfo(&raw.addr,
- size,
- host,
- INET6_ADDRSTRLEN,
- NULL,
- 0,
- NI_NUMERICHOST)) != 0) {
- const int kBufferSize = 1024;
- char error_message[kBufferSize];
- strerror_r(errno, error_message, kBufferSize);
- Log::PrintErr("Error getnameinfo: %s\n", error_message);
- return false;
- }
*port = SocketAddress::GetAddrPort(&raw);
- return true;
+ return new SocketAddress(&raw.addr);
}
« no previous file with comments | « dart/runtime/bin/socket.cc ('k') | dart/runtime/bin/socket_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698