| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 224 |
| 225 void RelayPort::SetReady() { | 225 void RelayPort::SetReady() { |
| 226 if (!ready_) { | 226 if (!ready_) { |
| 227 std::vector<ProtocolAddress>::iterator iter; | 227 std::vector<ProtocolAddress>::iterator iter; |
| 228 for (iter = external_addr_.begin(); | 228 for (iter = external_addr_.begin(); |
| 229 iter != external_addr_.end(); ++iter) { | 229 iter != external_addr_.end(); ++iter) { |
| 230 std::string proto_name = ProtoToString(iter->proto); | 230 std::string proto_name = ProtoToString(iter->proto); |
| 231 // In case of Gturn, related address is set to null socket address. | 231 // In case of Gturn, related address is set to null socket address. |
| 232 // This is due to as mapped address stun attribute is used for allocated | 232 // This is due to as mapped address stun attribute is used for allocated |
| 233 // address. | 233 // address. |
| 234 AddAddress(iter->address, iter->address, rtc::SocketAddress(), | 234 AddAddress(iter->address, iter->address, rtc::SocketAddress(), proto_name, |
| 235 proto_name, "", RELAY_PORT_TYPE, | 235 proto_name, "", RELAY_PORT_TYPE, ICE_TYPE_PREFERENCE_RELAY, 0, |
| 236 ICE_TYPE_PREFERENCE_RELAY, 0, false); | 236 false); |
| 237 } | 237 } |
| 238 ready_ = true; | 238 ready_ = true; |
| 239 SignalPortComplete(this); | 239 SignalPortComplete(this); |
| 240 } | 240 } |
| 241 } | 241 } |
| 242 | 242 |
| 243 const ProtocolAddress * RelayPort::ServerAddress(size_t index) const { | 243 const ProtocolAddress * RelayPort::ServerAddress(size_t index) const { |
| 244 if (index < server_addr_.size()) | 244 if (index < server_addr_.size()) |
| 245 return &server_addr_[index]; | 245 return &server_addr_[index]; |
| 246 return NULL; | 246 return NULL; |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 if (rtc::TimeSince(start_time_) <= kRetryTimeout) | 820 if (rtc::TimeSince(start_time_) <= kRetryTimeout) |
| 821 entry_->ScheduleKeepAlive(); | 821 entry_->ScheduleKeepAlive(); |
| 822 } | 822 } |
| 823 | 823 |
| 824 void AllocateRequest::OnTimeout() { | 824 void AllocateRequest::OnTimeout() { |
| 825 LOG(INFO) << "Allocate request timed out"; | 825 LOG(INFO) << "Allocate request timed out"; |
| 826 entry_->HandleConnectFailure(connection_->socket()); | 826 entry_->HandleConnectFailure(connection_->socket()); |
| 827 } | 827 } |
| 828 | 828 |
| 829 } // namespace cricket | 829 } // namespace cricket |
| OLD | NEW |