From 33045ab2c1539634eac564ceb84b1e8c313607b2 Mon Sep 17 00:00:00 2001 From: "henrike@webrtc.org" Date: Mon, 10 Nov 2014 19:43:11 +0000 Subject: [PATCH] Change from talk/p2p (r7664) "(Auto)update libjingle 79414100-> 79428003". BUG=3379 R=tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/27119004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7674 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/p2p/client/connectivitychecker.cc | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/webrtc/p2p/client/connectivitychecker.cc b/webrtc/p2p/client/connectivitychecker.cc index 6e3598e795..07c9d8b0d7 100644 --- a/webrtc/p2p/client/connectivitychecker.cc +++ b/webrtc/p2p/client/connectivitychecker.cc @@ -231,9 +231,7 @@ void ConnectivityChecker::OnRequestDone(rtc::AsyncHttpRequest* request) { int port = request->port(); uint32 now = rtc::Time(); NicInfo* nic_info = &i->second; - if (port == rtc::HTTP_DEFAULT_PORT) { - nic_info->http.rtt = now - nic_info->http.start_time_ms; - } else if (port == rtc::HTTP_SECURE_PORT) { + if (port == rtc::HTTP_SECURE_PORT) { nic_info->https.rtt = now - nic_info->https.start_time_ms; } else { LOG(LS_ERROR) << "Got response with unknown port: " << port; @@ -504,7 +502,7 @@ void ConnectivityChecker::InitiateProxyDetection() { if (!proxy_detect_) { proxy_detect_ = new rtc::AutoDetectProxy(user_agent_); rtc::Url host_url("/", "relay.google.com", - rtc::HTTP_DEFAULT_PORT); + rtc::HTTP_SECURE_PORT); host_url.set_secure(true); proxy_detect_->set_server_url(host_url.url()); proxy_detect_->SignalWorkDone.connect( @@ -528,13 +526,11 @@ void ConnectivityChecker::AllocateRelayPorts() { allocator_session->SignalRequestDone.connect( this, &ConnectivityChecker::OnRequestDone); - // Try both http and https. + // Try https only since using http would result in credentials being sent + // over the network unprotected. RegisterHttpStart(rtc::HTTP_SECURE_PORT); allocator_session->SendSessionRequest("relay.l.google.com", rtc::HTTP_SECURE_PORT); - RegisterHttpStart(rtc::HTTP_DEFAULT_PORT); - allocator_session->SendSessionRequest("relay.l.google.com", - rtc::HTTP_DEFAULT_PORT); sessions_.push_back(allocator_session); } @@ -558,9 +554,7 @@ void ConnectivityChecker::RegisterHttpStart(int port) { if (i != nics_.end()) { uint32 now = rtc::Time(); NicInfo* nic_info = &i->second; - if (port == rtc::HTTP_DEFAULT_PORT) { - nic_info->http.start_time_ms = now; - } else if (port == rtc::HTTP_SECURE_PORT) { + if (port == rtc::HTTP_SECURE_PORT) { nic_info->https.start_time_ms = now; } else { LOG(LS_ERROR) << "Registering start time for unknown port: " << port;