| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 if (!ready_) { | 238 if (!ready_) { |
| 239 std::vector<ProtocolAddress>::iterator iter; | 239 std::vector<ProtocolAddress>::iterator iter; |
| 240 for (iter = external_addr_.begin(); | 240 for (iter = external_addr_.begin(); |
| 241 iter != external_addr_.end(); ++iter) { | 241 iter != external_addr_.end(); ++iter) { |
| 242 std::string proto_name = ProtoToString(iter->proto); | 242 std::string proto_name = ProtoToString(iter->proto); |
| 243 // In case of Gturn, related address is set to null socket address. | 243 // In case of Gturn, related address is set to null socket address. |
| 244 // This is due to as mapped address stun attribute is used for allocated | 244 // This is due to as mapped address stun attribute is used for allocated |
| 245 // address. | 245 // address. |
| 246 AddAddress(iter->address, iter->address, rtc::SocketAddress(), proto_name, | 246 AddAddress(iter->address, iter->address, rtc::SocketAddress(), proto_name, |
| 247 proto_name, "", RELAY_PORT_TYPE, ICE_TYPE_PREFERENCE_RELAY_UDP, | 247 proto_name, "", RELAY_PORT_TYPE, ICE_TYPE_PREFERENCE_RELAY_UDP, |
| 248 0, false); | 248 0, "", false); |
| 249 } | 249 } |
| 250 ready_ = true; | 250 ready_ = true; |
| 251 SignalPortComplete(this); | 251 SignalPortComplete(this); |
| 252 } | 252 } |
| 253 } | 253 } |
| 254 | 254 |
| 255 const ProtocolAddress * RelayPort::ServerAddress(size_t index) const { | 255 const ProtocolAddress * RelayPort::ServerAddress(size_t index) const { |
| 256 if (index < server_addr_.size()) | 256 if (index < server_addr_.size()) |
| 257 return &server_addr_[index]; | 257 return &server_addr_[index]; |
| 258 return NULL; | 258 return NULL; |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 if (rtc::TimeMillis() - start_time_ <= kRetryTimeout) | 839 if (rtc::TimeMillis() - start_time_ <= kRetryTimeout) |
| 840 entry_->ScheduleKeepAlive(); | 840 entry_->ScheduleKeepAlive(); |
| 841 } | 841 } |
| 842 | 842 |
| 843 void AllocateRequest::OnTimeout() { | 843 void AllocateRequest::OnTimeout() { |
| 844 LOG(INFO) << "Allocate request timed out"; | 844 LOG(INFO) << "Allocate request timed out"; |
| 845 entry_->HandleConnectFailure(connection_->socket()); | 845 entry_->HandleConnectFailure(connection_->socket()); |
| 846 } | 846 } |
| 847 | 847 |
| 848 } // namespace cricket | 848 } // namespace cricket |
| OLD | NEW |