Chromium Code Reviews

Side by Side Diff: webrtc/p2p/client/basicportallocator.cc

Issue 2988153003: Replace CHECK(x && y) with two separate CHECK() calls (Closed)
Patch Set: fix link failure Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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 1335 matching lines...)
1346 } 1346 }
1347 1347
1348 void AllocationSequence::CreateRelayPorts() { 1348 void AllocationSequence::CreateRelayPorts() {
1349 if (IsFlagSet(PORTALLOCATOR_DISABLE_RELAY)) { 1349 if (IsFlagSet(PORTALLOCATOR_DISABLE_RELAY)) {
1350 LOG(LS_VERBOSE) << "AllocationSequence: Relay ports disabled, skipping."; 1350 LOG(LS_VERBOSE) << "AllocationSequence: Relay ports disabled, skipping.";
1351 return; 1351 return;
1352 } 1352 }
1353 1353
1354 // If BasicPortAllocatorSession::OnAllocate left relay ports enabled then we 1354 // If BasicPortAllocatorSession::OnAllocate left relay ports enabled then we
1355 // ought to have a relay list for them here. 1355 // ought to have a relay list for them here.
1356 RTC_DCHECK(config_ && !config_->relays.empty()); 1356 RTC_DCHECK(config_);
1357 RTC_DCHECK(!config_->relays.empty());
1357 if (!(config_ && !config_->relays.empty())) { 1358 if (!(config_ && !config_->relays.empty())) {
1358 LOG(LS_WARNING) 1359 LOG(LS_WARNING)
1359 << "AllocationSequence: No relay server configured, skipping."; 1360 << "AllocationSequence: No relay server configured, skipping.";
1360 return; 1361 return;
1361 } 1362 }
1362 1363
1363 for (RelayServerConfig& relay : config_->relays) { 1364 for (RelayServerConfig& relay : config_->relays) {
1364 if (relay.type == RELAY_GTURN) { 1365 if (relay.type == RELAY_GTURN) {
1365 CreateGturnPort(relay); 1366 CreateGturnPort(relay);
1366 } else if (relay.type == RELAY_TURN) { 1367 } else if (relay.type == RELAY_TURN) {
(...skipping 212 matching lines...)
1579 ServerAddresses servers; 1580 ServerAddresses servers;
1580 for (size_t i = 0; i < relays.size(); ++i) { 1581 for (size_t i = 0; i < relays.size(); ++i) {
1581 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { 1582 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) {
1582 servers.insert(relays[i].ports.front().address); 1583 servers.insert(relays[i].ports.front().address);
1583 } 1584 }
1584 } 1585 }
1585 return servers; 1586 return servers;
1586 } 1587 }
1587 1588
1588 } // namespace cricket 1589 } // namespace cricket
OLDNEW

Powered by Google App Engine