| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 void RelayPort::SetReady() { | 236 void RelayPort::SetReady() { |
| 237 if (!ready_) { | 237 if (!ready_) { |
| 238 std::vector<ProtocolAddress>::iterator iter; | 238 std::vector<ProtocolAddress>::iterator iter; |
| 239 for (iter = external_addr_.begin(); | 239 for (iter = external_addr_.begin(); |
| 240 iter != external_addr_.end(); ++iter) { | 240 iter != external_addr_.end(); ++iter) { |
| 241 std::string proto_name = ProtoToString(iter->proto); | 241 std::string proto_name = ProtoToString(iter->proto); |
| 242 // In case of Gturn, related address is set to null socket address. | 242 // In case of Gturn, related address is set to null socket address. |
| 243 // This is due to as mapped address stun attribute is used for allocated | 243 // This is due to as mapped address stun attribute is used for allocated |
| 244 // address. | 244 // address. |
| 245 AddAddress(iter->address, iter->address, rtc::SocketAddress(), proto_name, | 245 AddAddress(iter->address, iter->address, rtc::SocketAddress(), proto_name, |
| 246 proto_name, "", RELAY_PORT_TYPE, ICE_TYPE_PREFERENCE_RELAY, 0, | 246 proto_name, "", RELAY_PORT_TYPE, ICE_TYPE_PREFERENCE_RELAY_UDP, |
| 247 false); | 247 0, false); |
| 248 } | 248 } |
| 249 ready_ = true; | 249 ready_ = true; |
| 250 SignalPortComplete(this); | 250 SignalPortComplete(this); |
| 251 } | 251 } |
| 252 } | 252 } |
| 253 | 253 |
| 254 const ProtocolAddress * RelayPort::ServerAddress(size_t index) const { | 254 const ProtocolAddress * RelayPort::ServerAddress(size_t index) const { |
| 255 if (index < server_addr_.size()) | 255 if (index < server_addr_.size()) |
| 256 return &server_addr_[index]; | 256 return &server_addr_[index]; |
| 257 return NULL; | 257 return NULL; |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 if (rtc::TimeMillis() - start_time_ <= kRetryTimeout) | 837 if (rtc::TimeMillis() - start_time_ <= kRetryTimeout) |
| 838 entry_->ScheduleKeepAlive(); | 838 entry_->ScheduleKeepAlive(); |
| 839 } | 839 } |
| 840 | 840 |
| 841 void AllocateRequest::OnTimeout() { | 841 void AllocateRequest::OnTimeout() { |
| 842 LOG(INFO) << "Allocate request timed out"; | 842 LOG(INFO) << "Allocate request timed out"; |
| 843 entry_->HandleConnectFailure(connection_->socket()); | 843 entry_->HandleConnectFailure(connection_->socket()); |
| 844 } | 844 } |
| 845 | 845 |
| 846 } // namespace cricket | 846 } // namespace cricket |
| OLD | NEW |