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

Side by Side Diff: webrtc/pc/jsepsessiondescription.cc

Issue 2773623002: Fix the fuzz test. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | 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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 static int GetCandidatePreferenceFromType(const std::string& type) { 53 static int GetCandidatePreferenceFromType(const std::string& type) {
54 int preference = kPreferenceUnknown; 54 int preference = kPreferenceUnknown;
55 if (type == cricket::LOCAL_PORT_TYPE) { 55 if (type == cricket::LOCAL_PORT_TYPE) {
56 preference = kPreferenceHost; 56 preference = kPreferenceHost;
57 } else if (type == cricket::STUN_PORT_TYPE) { 57 } else if (type == cricket::STUN_PORT_TYPE) {
58 preference = kPreferenceReflexive; 58 preference = kPreferenceReflexive;
59 } else if (type == cricket::RELAY_PORT_TYPE) { 59 } else if (type == cricket::RELAY_PORT_TYPE) {
60 preference = kPreferenceRelayed; 60 preference = kPreferenceRelayed;
61 } else { 61 } else {
62 RTC_NOTREACHED(); 62 preference = kPreferenceUnknown;
63 } 63 }
64 return preference; 64 return preference;
65 } 65 }
66 66
67 // Update the connection address for the MediaContentDescription based on the 67 // Update the connection address for the MediaContentDescription based on the
68 // candidates. 68 // candidates.
69 static void UpdateConnectionAddress( 69 static void UpdateConnectionAddress(
70 const JsepCandidateCollection& candidate_collection, 70 const JsepCandidateCollection& candidate_collection,
71 cricket::ContentDescription* content_description) { 71 cricket::ContentDescription* content_description) {
72 int port = kDummyPort; 72 int port = kDummyPort;
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 const std::string& transport_name = candidate.transport_name(); 265 const std::string& transport_name = candidate.transport_name();
266 for (size_t i = 0; i < description_->contents().size(); ++i) { 266 for (size_t i = 0; i < description_->contents().size(); ++i) {
267 if (transport_name == description_->contents().at(i).name) { 267 if (transport_name == description_->contents().at(i).name) {
268 return static_cast<int>(i); 268 return static_cast<int>(i);
269 } 269 }
270 } 270 }
271 return -1; 271 return -1;
272 } 272 }
273 273
274 } // namespace webrtc 274 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698