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

Unified Diff: runtime/bin/socket_android.cc

Issue 17341008: Update mac and android Socket::LookupAddress. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months 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 | « no previous file | runtime/bin/socket_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_android.cc
diff --git a/runtime/bin/socket_android.cc b/runtime/bin/socket_android.cc
index cc0dce15c957f85add7c4a8b53a02b3c051ae4cb..0aa5968eb5d00eec57bfc8161b0a1895f8eb4018 100644
--- a/runtime/bin/socket_android.cc
+++ b/runtime/bin/socket_android.cc
@@ -186,9 +186,9 @@ intptr_t Socket::GetStdioHandle(int num) {
}
-SocketAddresses* Socket::LookupAddress(const char* host,
- int type,
- OSError** os_error) {
+AddressList<SocketAddress>* Socket::LookupAddress(const char* host,
+ int type,
+ OSError** os_error) {
// Perform a name lookup for a host name.
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
@@ -209,11 +209,11 @@ SocketAddresses* Socket::LookupAddress(const char* host,
for (struct addrinfo* c = info; c != NULL; c = c->ai_next) {
if (c->ai_family == AF_INET || c->ai_family == AF_INET6) count++;
}
- SocketAddresses* addresses = new SocketAddresses(count);
intptr_t i = 0;
+ AddressList<SocketAddress>* addresses = new AddressList<SocketAddress>(count);
for (struct addrinfo* c = info; c != NULL; c = c->ai_next) {
if (c->ai_family == AF_INET || c->ai_family == AF_INET6) {
- addresses->SetAt(i, new SocketAddress(c));
+ addresses->SetAt(i, new SocketAddress(c->ai_addr));
i++;
}
}
« no previous file with comments | « no previous file | runtime/bin/socket_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698