| 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 |
| 11 #include <utility> // for std::pair | 11 #include <utility> // for std::pair |
| 12 | 12 |
| 13 #include "webrtc/p2p/base/transport.h" | 13 #include "webrtc/p2p/base/transport.h" |
| 14 | 14 |
| 15 #include "webrtc/p2p/base/candidate.h" | 15 #include "webrtc/p2p/base/candidate.h" |
| 16 #include "webrtc/p2p/base/constants.h" | 16 #include "webrtc/p2p/base/constants.h" |
| 17 #include "webrtc/p2p/base/port.h" | 17 #include "webrtc/p2p/base/port.h" |
| 18 #include "webrtc/p2p/base/transportchannelimpl.h" | 18 #include "webrtc/p2p/base/transportchannelimpl.h" |
| 19 #include "webrtc/base/bind.h" | 19 #include "webrtc/base/bind.h" |
| 20 #include "webrtc/base/checks.h" | 20 #include "webrtc/base/checks.h" |
| 21 #include "webrtc/base/logging.h" | 21 #include "webrtc/base/logging.h" |
| 22 | 22 |
| 23 namespace cricket { | 23 namespace cricket { |
| 24 | 24 |
| 25 using rtc::Bind; | |
| 26 | |
| 27 static bool VerifyIceParams(const TransportDescription& desc) { | 25 static bool VerifyIceParams(const TransportDescription& desc) { |
| 28 // For legacy protocols. | 26 // For legacy protocols. |
| 29 if (desc.ice_ufrag.empty() && desc.ice_pwd.empty()) | 27 if (desc.ice_ufrag.empty() && desc.ice_pwd.empty()) |
| 30 return true; | 28 return true; |
| 31 | 29 |
| 32 if (desc.ice_ufrag.length() < ICE_UFRAG_MIN_LENGTH || | 30 if (desc.ice_ufrag.length() < ICE_UFRAG_MIN_LENGTH || |
| 33 desc.ice_ufrag.length() > ICE_UFRAG_MAX_LENGTH) { | 31 desc.ice_ufrag.length() > ICE_UFRAG_MAX_LENGTH) { |
| 34 return false; | 32 return false; |
| 35 } | 33 } |
| 36 if (desc.ice_pwd.length() < ICE_PWD_MIN_LENGTH || | 34 if (desc.ice_pwd.length() < ICE_PWD_MIN_LENGTH || |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 // negotiation happens. | 382 // negotiation happens. |
| 385 for (const auto& kv : channels_) { | 383 for (const auto& kv : channels_) { |
| 386 if (!ApplyNegotiatedTransportDescription(kv.second, error_desc)) { | 384 if (!ApplyNegotiatedTransportDescription(kv.second, error_desc)) { |
| 387 return false; | 385 return false; |
| 388 } | 386 } |
| 389 } | 387 } |
| 390 return true; | 388 return true; |
| 391 } | 389 } |
| 392 | 390 |
| 393 } // namespace cricket | 391 } // namespace cricket |
| OLD | NEW |