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

Unified Diff: net/socket/ssl_client_socket_mac.cc

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: get_canonical_name -> canonical_name. iterator to indexing Created 8 years, 7 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 | « net/socket/socks_client_socket.cc ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_mac.cc
diff --git a/net/socket/ssl_client_socket_mac.cc b/net/socket/ssl_client_socket_mac.cc
index e847c15db5fc206c0bc92b2c370225fa70ce5ecc..f84f3fb6925547a45c6e4d073200f1d81eb8ff12 100644
--- a/net/socket/ssl_client_socket_mac.cc
+++ b/net/socket/ssl_client_socket_mac.cc
@@ -880,10 +880,10 @@ int SSLClientSocketMac::InitializeSSLContext() {
int rv = transport_->socket()->GetPeerAddress(&address);
if (rv != OK)
return rv;
- const struct addrinfo* ai = address.head();
+ const IPEndPoint& endpoint = address.front();
std::string peer_id(host_and_port_.ToString());
- peer_id += std::string(reinterpret_cast<char*>(ai->ai_addr),
- ai->ai_addrlen);
+ peer_id += std::string(reinterpret_cast<const char*>(&endpoint.address()[0]),
+ endpoint.address().size());
// SSLSetPeerID() treats peer_id as a binary blob, and makes its
// own copy.
status = SSLSetPeerID(ssl_context_, peer_id.data(), peer_id.length());
« no previous file with comments | « net/socket/socks_client_socket.cc ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698