TCP remote socket address should have both server hostname and IP address.

Hostname is necessary when we are creating TLS based socket, for certificate
verification.

BUG=https://code.google.com/p/chromium/issues/detail?id=306285
R=jiayl@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/19489004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6165 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mallinath@webrtc.org 2014-05-14 22:43:05 +00:00
parent a150bc9bbf
commit bb6201ae4b

View File

@ -454,7 +454,9 @@ void TurnPort::ResolveTurnAddress(const talk_base::SocketAddress& address) {
void TurnPort::OnResolveResult(talk_base::AsyncResolverInterface* resolver) {
ASSERT(resolver == resolver_);
talk_base::SocketAddress resolved_address;
// Copy the original server address in |resolved_address|. For TLS based
// sockets we need hostname along with resolved address.
talk_base::SocketAddress resolved_address = server_address_.address;
if (resolver_->GetError() != 0 ||
!resolver_->GetResolvedAddress(ip().family(), &resolved_address)) {
LOG_J(LS_WARNING, this) << "TURN host lookup received error "