| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 if (!local_description_) { | 230 if (!local_description_) { |
| 231 // TOOD(mallinath) : TransportDescription(TD) shouldn't be generated here. | 231 // TOOD(mallinath) : TransportDescription(TD) shouldn't be generated here. |
| 232 // As Transport must know TD is offer or answer and cricket::Transport | 232 // As Transport must know TD is offer or answer and cricket::Transport |
| 233 // doesn't have the capability to decide it. This should be set by the | 233 // doesn't have the capability to decide it. This should be set by the |
| 234 // Session. | 234 // Session. |
| 235 // Session must generate local TD before remote candidates pushed when | 235 // Session must generate local TD before remote candidates pushed when |
| 236 // initiate request initiated by the remote. | 236 // initiate request initiated by the remote. |
| 237 LOG(LS_INFO) << "Transport::ConnectChannels: No local description has " | 237 LOG(LS_INFO) << "Transport::ConnectChannels: No local description has " |
| 238 << "been set. Will generate one."; | 238 << "been set. Will generate one."; |
| 239 TransportDescription desc( | 239 TransportDescription desc(std::vector<std::string>(), |
| 240 std::vector<std::string>(), rtc::CreateRandomString(ICE_UFRAG_LENGTH), | 240 rtc::CreateRandomString(ICE_UFRAG_LENGTH), |
| 241 rtc::CreateRandomString(ICE_PWD_LENGTH), ICEMODE_FULL, | 241 rtc::CreateRandomString(ICE_PWD_LENGTH), |
| 242 CONNECTIONROLE_NONE, nullptr, Candidates()); | 242 ICEMODE_FULL, CONNECTIONROLE_NONE, nullptr); |
| 243 SetLocalTransportDescription(desc, CA_OFFER, nullptr); | 243 SetLocalTransportDescription(desc, CA_OFFER, nullptr); |
| 244 } | 244 } |
| 245 | 245 |
| 246 CallChannels(&TransportChannelImpl::Connect); | 246 CallChannels(&TransportChannelImpl::Connect); |
| 247 } | 247 } |
| 248 | 248 |
| 249 void Transport::MaybeStartGathering() { | 249 void Transport::MaybeStartGathering() { |
| 250 if (connect_requested_) { | 250 if (connect_requested_) { |
| 251 CallChannels(&TransportChannelImpl::MaybeStartGathering); | 251 CallChannels(&TransportChannelImpl::MaybeStartGathering); |
| 252 } | 252 } |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 // negotiation happens. | 382 // negotiation happens. |
| 383 for (const auto& kv : channels_) { | 383 for (const auto& kv : channels_) { |
| 384 if (!ApplyNegotiatedTransportDescription(kv.second, error_desc)) { | 384 if (!ApplyNegotiatedTransportDescription(kv.second, error_desc)) { |
| 385 return false; | 385 return false; |
| 386 } | 386 } |
| 387 } | 387 } |
| 388 return true; | 388 return true; |
| 389 } | 389 } |
| 390 | 390 |
| 391 } // namespace cricket | 391 } // namespace cricket |
| OLD | NEW |