Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

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

Issue 2988153003: Replace CHECK(x && y) with two separate CHECK() calls (Closed)
Patch Set: fix mistakes Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel_unittest.cc ('k') | webrtc/pc/datachannel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 } 1343 }
1344 1344
1345 void AllocationSequence::CreateRelayPorts() { 1345 void AllocationSequence::CreateRelayPorts() {
1346 if (IsFlagSet(PORTALLOCATOR_DISABLE_RELAY)) { 1346 if (IsFlagSet(PORTALLOCATOR_DISABLE_RELAY)) {
1347 LOG(LS_VERBOSE) << "AllocationSequence: Relay ports disabled, skipping."; 1347 LOG(LS_VERBOSE) << "AllocationSequence: Relay ports disabled, skipping.";
1348 return; 1348 return;
1349 } 1349 }
1350 1350
1351 // If BasicPortAllocatorSession::OnAllocate left relay ports enabled then we 1351 // If BasicPortAllocatorSession::OnAllocate left relay ports enabled then we
1352 // ought to have a relay list for them here. 1352 // ought to have a relay list for them here.
1353 RTC_DCHECK(config_ && !config_->relays.empty()); 1353 RTC_DCHECK(config_);
1354 RTC_DCHECK(!config_->relays.empty());
1354 if (!(config_ && !config_->relays.empty())) { 1355 if (!(config_ && !config_->relays.empty())) {
1355 LOG(LS_WARNING) 1356 LOG(LS_WARNING)
1356 << "AllocationSequence: No relay server configured, skipping."; 1357 << "AllocationSequence: No relay server configured, skipping.";
1357 return; 1358 return;
1358 } 1359 }
1359 1360
1360 for (RelayServerConfig& relay : config_->relays) { 1361 for (RelayServerConfig& relay : config_->relays) {
1361 if (relay.type == RELAY_GTURN) { 1362 if (relay.type == RELAY_GTURN) {
1362 CreateGturnPort(relay); 1363 CreateGturnPort(relay);
1363 } else if (relay.type == RELAY_TURN) { 1364 } else if (relay.type == RELAY_TURN) {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 ServerAddresses servers; 1571 ServerAddresses servers;
1571 for (size_t i = 0; i < relays.size(); ++i) { 1572 for (size_t i = 0; i < relays.size(); ++i) {
1572 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { 1573 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) {
1573 servers.insert(relays[i].ports.front().address); 1574 servers.insert(relays[i].ports.front().address);
1574 } 1575 }
1575 } 1576 }
1576 return servers; 1577 return servers;
1577 } 1578 }
1578 1579
1579 } // namespace cricket 1580 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel_unittest.cc ('k') | webrtc/pc/datachannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698