| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 c.set_relay_protocol(relay_protocol); | 250 c.set_relay_protocol(relay_protocol); |
| 251 c.set_tcptype(tcptype); | 251 c.set_tcptype(tcptype); |
| 252 c.set_address(address); | 252 c.set_address(address); |
| 253 c.set_priority(c.GetPriority(type_preference, network_->preference(), | 253 c.set_priority(c.GetPriority(type_preference, network_->preference(), |
| 254 relay_preference)); | 254 relay_preference)); |
| 255 c.set_username(username_fragment()); | 255 c.set_username(username_fragment()); |
| 256 c.set_password(password_); | 256 c.set_password(password_); |
| 257 c.set_network_name(network_->name()); | 257 c.set_network_name(network_->name()); |
| 258 c.set_network_type(network_->type()); | 258 c.set_network_type(network_->type()); |
| 259 c.set_network_cost(network_cost_); | 259 c.set_network_cost(network_cost_); |
| 260 c.set_network_id(network_->id()); |
| 260 c.set_generation(generation_); | 261 c.set_generation(generation_); |
| 261 c.set_related_address(related_address); | 262 c.set_related_address(related_address); |
| 262 c.set_foundation( | 263 c.set_foundation( |
| 263 ComputeFoundation(type, protocol, relay_protocol, base_address)); | 264 ComputeFoundation(type, protocol, relay_protocol, base_address)); |
| 264 candidates_.push_back(c); | 265 candidates_.push_back(c); |
| 265 SignalCandidateReady(this, c); | 266 SignalCandidateReady(this, c); |
| 266 | 267 |
| 267 if (final) { | 268 if (final) { |
| 268 SignalPortComplete(this); | 269 SignalPortComplete(this); |
| 269 } | 270 } |
| (...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 new_local_candidate.set_component(local_candidate().component()); | 1407 new_local_candidate.set_component(local_candidate().component()); |
| 1407 new_local_candidate.set_type(PRFLX_PORT_TYPE); | 1408 new_local_candidate.set_type(PRFLX_PORT_TYPE); |
| 1408 new_local_candidate.set_protocol(local_candidate().protocol()); | 1409 new_local_candidate.set_protocol(local_candidate().protocol()); |
| 1409 new_local_candidate.set_address(addr->GetAddress()); | 1410 new_local_candidate.set_address(addr->GetAddress()); |
| 1410 new_local_candidate.set_priority(priority); | 1411 new_local_candidate.set_priority(priority); |
| 1411 new_local_candidate.set_username(local_candidate().username()); | 1412 new_local_candidate.set_username(local_candidate().username()); |
| 1412 new_local_candidate.set_password(local_candidate().password()); | 1413 new_local_candidate.set_password(local_candidate().password()); |
| 1413 new_local_candidate.set_network_name(local_candidate().network_name()); | 1414 new_local_candidate.set_network_name(local_candidate().network_name()); |
| 1414 new_local_candidate.set_network_type(local_candidate().network_type()); | 1415 new_local_candidate.set_network_type(local_candidate().network_type()); |
| 1415 new_local_candidate.set_network_cost(local_candidate().network_cost()); | 1416 new_local_candidate.set_network_cost(local_candidate().network_cost()); |
| 1417 new_local_candidate.set_network_id(local_candidate().network_id()); |
| 1416 new_local_candidate.set_related_address(local_candidate().address()); | 1418 new_local_candidate.set_related_address(local_candidate().address()); |
| 1417 new_local_candidate.set_foundation(ComputeFoundation( | 1419 new_local_candidate.set_foundation(ComputeFoundation( |
| 1418 PRFLX_PORT_TYPE, local_candidate().protocol(), | 1420 PRFLX_PORT_TYPE, local_candidate().protocol(), |
| 1419 local_candidate().relay_protocol(), local_candidate().address())); | 1421 local_candidate().relay_protocol(), local_candidate().address())); |
| 1420 | 1422 |
| 1421 // Change the local candidate of this Connection to the new prflx candidate. | 1423 // Change the local candidate of this Connection to the new prflx candidate. |
| 1422 local_candidate_index_ = port_->AddPrflxCandidate(new_local_candidate); | 1424 local_candidate_index_ = port_->AddPrflxCandidate(new_local_candidate); |
| 1423 | 1425 |
| 1424 // SignalStateChange to force a re-sort in P2PTransportChannel as this | 1426 // SignalStateChange to force a re-sort in P2PTransportChannel as this |
| 1425 // Connection's local candidate has changed. | 1427 // Connection's local candidate has changed. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1444 ASSERT(sent < 0); | 1446 ASSERT(sent < 0); |
| 1445 error_ = port_->GetError(); | 1447 error_ = port_->GetError(); |
| 1446 sent_packets_discarded_++; | 1448 sent_packets_discarded_++; |
| 1447 } else { | 1449 } else { |
| 1448 send_rate_tracker_.AddSamples(sent); | 1450 send_rate_tracker_.AddSamples(sent); |
| 1449 } | 1451 } |
| 1450 return sent; | 1452 return sent; |
| 1451 } | 1453 } |
| 1452 | 1454 |
| 1453 } // namespace cricket | 1455 } // namespace cricket |
| OLD | NEW |