diff options
Diffstat (limited to 'net/socket')
-rw-r--r-- | net/socket/socks_client_socket.cc | 11 | ||||
-rw-r--r-- | net/socket/socks_client_socket.h | 3 |
2 files changed, 5 insertions, 9 deletions
diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc index bbd9e80..3575729 100644 --- a/net/socket/socks_client_socket.cc +++ b/net/socket/socks_client_socket.cc @@ -8,7 +8,7 @@ #include "build/build_config.h" #if defined(OS_WIN) #include <ws2tcpip.h> -#else +#elif defined(OS_POSIX) #include <netdb.h> #endif #include "base/compiler_specific.h" @@ -375,12 +375,9 @@ int SOCKSClientSocket::DoHandshakeReadComplete(int result) { } #if defined(OS_LINUX) -// Identical to posix system call getpeername(). -// Needed by ssl_client_socket_nss. -int SOCKSClientSocket::GetPeerName(struct sockaddr *name, socklen_t *namelen) { - // Default implementation just permits some unit tests to link. - NOTREACHED(); - return ERR_UNEXPECTED; +int SOCKSClientSocket::GetPeerName(struct sockaddr* name, + socklen_t* namelen) { + return transport_->GetPeerName(name, namelen); } #endif diff --git a/net/socket/socks_client_socket.h b/net/socket/socks_client_socket.h index 575f263..1b0cd79 100644 --- a/net/socket/socks_client_socket.h +++ b/net/socket/socks_client_socket.h @@ -48,9 +48,8 @@ class SOCKSClientSocket : public ClientSocket { virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); #if defined(OS_LINUX) - // Identical to posix system call getpeername(). // Needed by ssl_client_socket_nss. - virtual int GetPeerName(struct sockaddr *name, socklen_t *namelen); + virtual int GetPeerName(struct sockaddr* name, socklen_t* namelen); #endif private: |