| 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 | 10 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 return; | 162 return; |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 | 165 |
| 166 metrics_observer()->IncrementEnumCounter( | 166 metrics_observer()->IncrementEnumCounter( |
| 167 webrtc::kEnumCounterIceRegathering, static_cast<int>(reason), | 167 webrtc::kEnumCounterIceRegathering, static_cast<int>(reason), |
| 168 static_cast<int>(IceRegatheringReason::MAX_VALUE)); | 168 static_cast<int>(IceRegatheringReason::MAX_VALUE)); |
| 169 } | 169 } |
| 170 | 170 |
| 171 BasicPortAllocator::~BasicPortAllocator() { | 171 BasicPortAllocator::~BasicPortAllocator() { |
| 172 // Our created port allocator sessions depend on us, so destroy our remaining |
| 173 // pooled sessions before anything else. |
| 174 DiscardCandidatePool(); |
| 172 } | 175 } |
| 173 | 176 |
| 174 PortAllocatorSession* BasicPortAllocator::CreateSessionInternal( | 177 PortAllocatorSession* BasicPortAllocator::CreateSessionInternal( |
| 175 const std::string& content_name, int component, | 178 const std::string& content_name, int component, |
| 176 const std::string& ice_ufrag, const std::string& ice_pwd) { | 179 const std::string& ice_ufrag, const std::string& ice_pwd) { |
| 177 PortAllocatorSession* session = new BasicPortAllocatorSession( | 180 PortAllocatorSession* session = new BasicPortAllocatorSession( |
| 178 this, content_name, component, ice_ufrag, ice_pwd); | 181 this, content_name, component, ice_ufrag, ice_pwd); |
| 179 session->SignalIceRegathering.connect(this, | 182 session->SignalIceRegathering.connect(this, |
| 180 &BasicPortAllocator::OnIceRegathering); | 183 &BasicPortAllocator::OnIceRegathering); |
| 181 return session; | 184 return session; |
| (...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1515 ServerAddresses servers; | 1518 ServerAddresses servers; |
| 1516 for (size_t i = 0; i < relays.size(); ++i) { | 1519 for (size_t i = 0; i < relays.size(); ++i) { |
| 1517 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { | 1520 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { |
| 1518 servers.insert(relays[i].ports.front().address); | 1521 servers.insert(relays[i].ports.front().address); |
| 1519 } | 1522 } |
| 1520 } | 1523 } |
| 1521 return servers; | 1524 return servers; |
| 1522 } | 1525 } |
| 1523 | 1526 |
| 1524 } // namespace cricket | 1527 } // namespace cricket |
| OLD | NEW |