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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 void BasicPortAllocatorSession::AddAllocatedPort(Port* port, | 682 void BasicPortAllocatorSession::AddAllocatedPort(Port* port, |
683 AllocationSequence * seq, | 683 AllocationSequence * seq, |
684 bool prepare_address) { | 684 bool prepare_address) { |
685 if (!port) | 685 if (!port) |
686 return; | 686 return; |
687 | 687 |
688 LOG(LS_INFO) << "Adding allocated port for " << content_name(); | 688 LOG(LS_INFO) << "Adding allocated port for " << content_name(); |
689 port->set_content_name(content_name()); | 689 port->set_content_name(content_name()); |
690 port->set_component(component()); | 690 port->set_component(component()); |
691 port->set_generation(generation()); | 691 port->set_generation(generation()); |
692 if (allocator_->proxy().type != rtc::PROXY_NONE) | |
693 port->set_proxy(allocator_->user_agent(), allocator_->proxy()); | |
694 port->set_send_retransmit_count_attribute( | 692 port->set_send_retransmit_count_attribute( |
695 (flags() & PORTALLOCATOR_ENABLE_STUN_RETRANSMIT_ATTRIBUTE) != 0); | 693 (flags() & PORTALLOCATOR_ENABLE_STUN_RETRANSMIT_ATTRIBUTE) != 0); |
696 | 694 |
697 PortData data(port, seq); | 695 PortData data(port, seq); |
698 ports_.push_back(data); | 696 ports_.push_back(data); |
699 | 697 |
700 port->SignalCandidateReady.connect( | 698 port->SignalCandidateReady.connect( |
701 this, &BasicPortAllocatorSession::OnCandidateReady); | 699 this, &BasicPortAllocatorSession::OnCandidateReady); |
702 port->SignalPortComplete.connect(this, | 700 port->SignalPortComplete.connect(this, |
703 &BasicPortAllocatorSession::OnPortComplete); | 701 &BasicPortAllocatorSession::OnPortComplete); |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1517 ServerAddresses servers; | 1515 ServerAddresses servers; |
1518 for (size_t i = 0; i < relays.size(); ++i) { | 1516 for (size_t i = 0; i < relays.size(); ++i) { |
1519 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { | 1517 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { |
1520 servers.insert(relays[i].ports.front().address); | 1518 servers.insert(relays[i].ports.front().address); |
1521 } | 1519 } |
1522 } | 1520 } |
1523 return servers; | 1521 return servers; |
1524 } | 1522 } |
1525 | 1523 |
1526 } // namespace cricket | 1524 } // namespace cricket |
OLD | NEW |