OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2009 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 } // namespace cricket | 81 } // namespace cricket |
82 | 82 |
83 class PortAllocatorTest : public testing::Test, public sigslot::has_slots<> { | 83 class PortAllocatorTest : public testing::Test, public sigslot::has_slots<> { |
84 public: | 84 public: |
85 PortAllocatorTest() | 85 PortAllocatorTest() |
86 : pss_(new rtc::PhysicalSocketServer), | 86 : pss_(new rtc::PhysicalSocketServer), |
87 vss_(new rtc::VirtualSocketServer(pss_.get())), | 87 vss_(new rtc::VirtualSocketServer(pss_.get())), |
88 fss_(new rtc::FirewallSocketServer(vss_.get())), | 88 fss_(new rtc::FirewallSocketServer(vss_.get())), |
89 ss_scope_(fss_.get()), | 89 ss_scope_(fss_.get()), |
90 nat_factory_(vss_.get(), kNatUdpAddr, kNatTcpAddr), | 90 nat_factory_(vss_.get(), kNatUdpAddr, kNatTcpAddr), |
91 nat_socket_factory_(&nat_factory_), | 91 nat_socket_factory_(new rtc::BasicPacketSocketFactory(&nat_factory_)), |
92 stun_server_(cricket::TestStunServer::Create(Thread::Current(), | 92 stun_server_(cricket::TestStunServer::Create(Thread::Current(), |
93 kStunAddr)), | 93 kStunAddr)), |
94 relay_server_(Thread::Current(), kRelayUdpIntAddr, kRelayUdpExtAddr, | 94 relay_server_(Thread::Current(), kRelayUdpIntAddr, kRelayUdpExtAddr, |
95 kRelayTcpIntAddr, kRelayTcpExtAddr, | 95 kRelayTcpIntAddr, kRelayTcpExtAddr, |
96 kRelaySslTcpIntAddr, kRelaySslTcpExtAddr), | 96 kRelaySslTcpIntAddr, kRelaySslTcpExtAddr), |
97 turn_server_(Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr), | 97 turn_server_(Thread::Current(), kTurnUdpIntAddr, kTurnUdpExtAddr), |
98 candidate_allocation_done_(false) { | 98 candidate_allocation_done_(false) { |
99 cricket::ServerAddresses stun_servers; | 99 cricket::ServerAddresses stun_servers; |
100 stun_servers.insert(kStunAddr); | 100 stun_servers.insert(kStunAddr); |
101 // Passing the addresses of GTURN servers will enable GTURN in | 101 // Passing the addresses of GTURN servers will enable GTURN in |
102 // Basicportallocator. | 102 // Basicportallocator. |
103 allocator_.reset(new cricket::BasicPortAllocator( | 103 allocator_.reset(new cricket::BasicPortAllocator( |
104 &network_manager_, | 104 &network_manager_, |
105 stun_servers, | 105 stun_servers, |
106 kRelayUdpIntAddr, kRelayTcpIntAddr, kRelaySslTcpIntAddr)); | 106 kRelayUdpIntAddr, kRelayTcpIntAddr, kRelaySslTcpIntAddr)); |
107 allocator_->set_step_delay(cricket::kMinimumStepDelay); | 107 allocator_->set_step_delay(cricket::kMinimumStepDelay); |
108 } | 108 } |
109 | 109 |
110 void AddInterface(const SocketAddress& addr) { | 110 void AddInterface(const SocketAddress& addr) { |
111 network_manager_.AddInterface(addr); | 111 network_manager_.AddInterface(addr); |
112 } | 112 } |
113 void AddInterfaceAsDefaultRoute(const SocketAddress& addr) { | |
114 AddInterface(addr); | |
115 // When a binding comes from the any address, the |addr| will be used as the | |
116 // srflx address. | |
117 vss_->SetDefaultRoute(addr.ipaddr()); | |
118 } | |
113 bool SetPortRange(int min_port, int max_port) { | 119 bool SetPortRange(int min_port, int max_port) { |
114 return allocator_->SetPortRange(min_port, max_port); | 120 return allocator_->SetPortRange(min_port, max_port); |
115 } | 121 } |
122 // No STUN/TURN configuration. | |
123 void ResetWithNoServers() { | |
124 allocator_.reset(new cricket::BasicPortAllocator(&network_manager_)); | |
125 allocator_->set_step_delay(cricket::kMinimumStepDelay); | |
126 } | |
116 void ResetWithNatServer(const rtc::SocketAddress& stun_server) { | 127 void ResetWithNatServer(const rtc::SocketAddress& stun_server) { |
117 nat_server_.reset(new rtc::NATServer( | 128 nat_server_.reset(new rtc::NATServer( |
118 rtc::NAT_OPEN_CONE, vss_.get(), kNatUdpAddr, kNatTcpAddr, vss_.get(), | 129 rtc::NAT_OPEN_CONE, vss_.get(), kNatUdpAddr, kNatTcpAddr, vss_.get(), |
119 rtc::SocketAddress(kNatUdpAddr.ipaddr(), 0))); | 130 rtc::SocketAddress(kNatUdpAddr.ipaddr(), 0))); |
120 | 131 |
121 ServerAddresses stun_servers; | 132 ServerAddresses stun_servers; |
122 if (!stun_server.IsNil()) { | 133 if (!stun_server.IsNil()) { |
123 stun_servers.insert(stun_server); | 134 stun_servers.insert(stun_server); |
124 } | 135 } |
125 allocator_.reset(new cricket::BasicPortAllocator( | 136 allocator_.reset(new cricket::BasicPortAllocator( |
126 &network_manager_, &nat_socket_factory_, stun_servers)); | 137 &network_manager_, nat_socket_factory_.get(), stun_servers)); |
127 allocator().set_step_delay(cricket::kMinimumStepDelay); | 138 allocator().set_step_delay(cricket::kMinimumStepDelay); |
128 } | 139 } |
129 | 140 |
141 void ResetWithStunServer(const rtc::SocketAddress& stun_server) { | |
142 nat_socket_factory_.reset(new rtc::BasicPacketSocketFactory()); | |
juberti1
2015/08/13 21:23:59
why do we need to change the socket factory here?
guoweis_webrtc
2015/08/14 05:24:25
nat_socket_factory assumes there is NAT.
juberti1
2015/08/14 23:22:42
OK, I was confused by the name, since typically yo
| |
143 | |
144 ServerAddresses stun_servers; | |
145 if (!stun_server.IsNil()) { | |
146 stun_servers.insert(stun_server); | |
147 } | |
148 allocator_.reset(new cricket::BasicPortAllocator( | |
149 &network_manager_, nat_socket_factory_.get(), stun_servers)); | |
150 allocator().set_step_delay(cricket::kMinimumStepDelay); | |
151 } | |
152 | |
130 // Create a BasicPortAllocator without GTURN and add the TURN servers. | 153 // Create a BasicPortAllocator without GTURN and add the TURN servers. |
131 void ResetWithTurnServers(const rtc::SocketAddress& udp_turn, | 154 void ResetWithTurnServers(const rtc::SocketAddress& udp_turn, |
132 const rtc::SocketAddress& tcp_turn) { | 155 const rtc::SocketAddress& tcp_turn) { |
133 allocator_.reset(new cricket::BasicPortAllocator(&network_manager_)); | 156 allocator_.reset(new cricket::BasicPortAllocator(&network_manager_)); |
134 allocator().set_step_delay(cricket::kMinimumStepDelay); | 157 allocator().set_step_delay(cricket::kMinimumStepDelay); |
135 AddTurnServers(udp_turn, tcp_turn); | 158 AddTurnServers(udp_turn, tcp_turn); |
136 } | 159 } |
137 | 160 |
138 void AddTurnServers(const rtc::SocketAddress& udp_turn, | 161 void AddTurnServers(const rtc::SocketAddress& udp_turn, |
139 const rtc::SocketAddress& tcp_turn) { | 162 const rtc::SocketAddress& tcp_turn) { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
225 (*it)->GetOption(rtc::Socket::OPT_SNDBUF, | 248 (*it)->GetOption(rtc::Socket::OPT_SNDBUF, |
226 &send_buffer_size)); | 249 &send_buffer_size)); |
227 } else { | 250 } else { |
228 EXPECT_EQ(0, (*it)->GetOption(rtc::Socket::OPT_SNDBUF, | 251 EXPECT_EQ(0, (*it)->GetOption(rtc::Socket::OPT_SNDBUF, |
229 &send_buffer_size)); | 252 &send_buffer_size)); |
230 ASSERT_EQ(expected, send_buffer_size); | 253 ASSERT_EQ(expected, send_buffer_size); |
231 } | 254 } |
232 } | 255 } |
233 } | 256 } |
234 | 257 |
235 void CheckDisableAdapterEnumeration() { | 258 // This function starts the port/address gathering and check the existence of |
259 // candidates as specified. When |expect_stun_candidate| is true, | |
260 // |stun_candidate_addr| carries the expected reflective address, which is | |
261 // also the related address for TURN candidate if it is expected. Otherwise, | |
262 // it should be ignore. | |
263 void CheckDisableAdapterEnumeration(uint32 total_ports, | |
264 bool expect_stun_candidate, | |
juberti1
2015/08/13 21:23:59
can we omit the second param? We can just check if
guoweis_webrtc
2015/08/14 05:24:25
Done.
| |
265 const rtc::IPAddress& stun_candidate_addr, | |
266 bool expect_relay_udp_candidate, | |
267 bool expect_relay_tcp_candidate) { | |
juberti1
2015/08/13 21:23:59
It's not really a TCP candidate. maybe call this e
guoweis_webrtc
2015/08/14 05:24:25
Done.
| |
236 EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTP)); | 268 EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTP)); |
237 session_->set_flags(cricket::PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION); | 269 session_->set_flags(cricket::PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION | |
270 cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | | |
271 cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET); | |
272 allocator().set_allow_tcp_listen(false); | |
238 session_->StartGettingPorts(); | 273 session_->StartGettingPorts(); |
239 EXPECT_TRUE_WAIT(candidate_allocation_done_, kDefaultAllocationTimeout); | 274 EXPECT_TRUE_WAIT(candidate_allocation_done_, kDefaultAllocationTimeout); |
240 | 275 |
241 // Only 2 candidates as local UDP/TCP are all 0s and get trimmed out. | 276 uint32 total_candidates = 0; |
242 EXPECT_EQ(2U, candidates_.size()); | 277 if (expect_stun_candidate) { |
243 EXPECT_EQ(2U, ports_.size()); // One stunport and one turnport. | 278 total_candidates++; |
juberti1
2015/08/13 21:23:59
Style: prefer preincrement (here and below)
guoweis_webrtc
2015/08/14 05:24:25
Done.
| |
279 } | |
280 if (expect_relay_udp_candidate) { | |
281 total_candidates++; | |
282 } | |
283 if (expect_relay_tcp_candidate) { | |
284 total_candidates++; | |
285 } | |
244 | 286 |
245 EXPECT_PRED5(CheckCandidate, candidates_[0], | 287 EXPECT_EQ(total_candidates, candidates_.size()); |
246 cricket::ICE_CANDIDATE_COMPONENT_RTP, "stun", "udp", | 288 EXPECT_EQ(total_ports, ports_.size()); |
247 rtc::SocketAddress(kNatUdpAddr.ipaddr(), 0)); | |
248 EXPECT_EQ( | |
249 rtc::EmptySocketAddressWithFamily(candidates_[0].address().family()), | |
250 candidates_[0].related_address()); | |
251 | 289 |
252 EXPECT_PRED5(CheckCandidate, candidates_[1], | 290 if (expect_stun_candidate) { |
253 cricket::ICE_CANDIDATE_COMPONENT_RTP, "relay", "udp", | 291 EXPECT_PRED5(CheckCandidate, candidates_[0], |
254 rtc::SocketAddress(kTurnUdpExtAddr.ipaddr(), 0)); | 292 cricket::ICE_CANDIDATE_COMPONENT_RTP, "stun", "udp", |
255 EXPECT_EQ(kNatUdpAddr.ipaddr(), candidates_[1].related_address().ipaddr()); | 293 rtc::SocketAddress(stun_candidate_addr, 0)); |
294 EXPECT_EQ( | |
295 rtc::EmptySocketAddressWithFamily(candidates_[0].address().family()), | |
296 candidates_[0].related_address()); | |
297 } | |
298 if (expect_relay_udp_candidate) { | |
299 EXPECT_PRED5(CheckCandidate, candidates_[1], | |
300 cricket::ICE_CANDIDATE_COMPONENT_RTP, "relay", "udp", | |
301 rtc::SocketAddress(kTurnUdpExtAddr.ipaddr(), 0)); | |
302 EXPECT_EQ(stun_candidate_addr, candidates_[1].related_address().ipaddr()); | |
303 } | |
304 if (expect_relay_tcp_candidate) { | |
305 EXPECT_PRED5(CheckCandidate, candidates_[2], | |
306 cricket::ICE_CANDIDATE_COMPONENT_RTP, "relay", "udp", | |
307 rtc::SocketAddress(kTurnUdpExtAddr.ipaddr(), 0)); | |
308 EXPECT_EQ(stun_candidate_addr, candidates_[2].related_address().ipaddr()); | |
309 } | |
256 } | 310 } |
257 | 311 |
258 protected: | 312 protected: |
259 cricket::BasicPortAllocator& allocator() { | 313 cricket::BasicPortAllocator& allocator() { |
260 return *allocator_; | 314 return *allocator_; |
261 } | 315 } |
262 | 316 |
263 void OnPortReady(cricket::PortAllocatorSession* ses, | 317 void OnPortReady(cricket::PortAllocatorSession* ses, |
264 cricket::PortInterface* port) { | 318 cricket::PortInterface* port) { |
265 LOG(LS_INFO) << "OnPortReady: " << port->ToString(); | 319 LOG(LS_INFO) << "OnPortReady: " << port->ToString(); |
(...skipping 20 matching lines...) Expand all Loading... | |
286 } | 340 } |
287 return false; | 341 return false; |
288 } | 342 } |
289 | 343 |
290 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; | 344 rtc::scoped_ptr<rtc::PhysicalSocketServer> pss_; |
291 rtc::scoped_ptr<rtc::VirtualSocketServer> vss_; | 345 rtc::scoped_ptr<rtc::VirtualSocketServer> vss_; |
292 rtc::scoped_ptr<rtc::FirewallSocketServer> fss_; | 346 rtc::scoped_ptr<rtc::FirewallSocketServer> fss_; |
293 rtc::SocketServerScope ss_scope_; | 347 rtc::SocketServerScope ss_scope_; |
294 rtc::scoped_ptr<rtc::NATServer> nat_server_; | 348 rtc::scoped_ptr<rtc::NATServer> nat_server_; |
295 rtc::NATSocketFactory nat_factory_; | 349 rtc::NATSocketFactory nat_factory_; |
296 rtc::BasicPacketSocketFactory nat_socket_factory_; | 350 rtc::scoped_ptr<rtc::BasicPacketSocketFactory> nat_socket_factory_; |
297 rtc::scoped_ptr<cricket::TestStunServer> stun_server_; | 351 rtc::scoped_ptr<cricket::TestStunServer> stun_server_; |
298 cricket::TestRelayServer relay_server_; | 352 cricket::TestRelayServer relay_server_; |
299 cricket::TestTurnServer turn_server_; | 353 cricket::TestTurnServer turn_server_; |
300 rtc::FakeNetworkManager network_manager_; | 354 rtc::FakeNetworkManager network_manager_; |
301 rtc::scoped_ptr<cricket::BasicPortAllocator> allocator_; | 355 rtc::scoped_ptr<cricket::BasicPortAllocator> allocator_; |
302 rtc::scoped_ptr<cricket::PortAllocatorSession> session_; | 356 rtc::scoped_ptr<cricket::PortAllocatorSession> session_; |
303 std::vector<cricket::PortInterface*> ports_; | 357 std::vector<cricket::PortInterface*> ports_; |
304 std::vector<cricket::Candidate> candidates_; | 358 std::vector<cricket::Candidate> candidates_; |
305 bool candidate_allocation_done_; | 359 bool candidate_allocation_done_; |
306 }; | 360 }; |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
448 EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTP)); | 502 EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTP)); |
449 session_->StartGettingPorts(); | 503 session_->StartGettingPorts(); |
450 rtc::Thread::Current()->ProcessMessages(100); | 504 rtc::Thread::Current()->ProcessMessages(100); |
451 // Without network adapter, we should not get any candidate. | 505 // Without network adapter, we should not get any candidate. |
452 EXPECT_EQ(0U, candidates_.size()); | 506 EXPECT_EQ(0U, candidates_.size()); |
453 EXPECT_TRUE(candidate_allocation_done_); | 507 EXPECT_TRUE(candidate_allocation_done_); |
454 } | 508 } |
455 | 509 |
456 // Test that we should only get STUN and TURN candidates when adapter | 510 // Test that we should only get STUN and TURN candidates when adapter |
457 // enumeration is disabled. | 511 // enumeration is disabled. |
458 TEST_F(PortAllocatorTest, TestDisableAdapterEnumeration) { | 512 TEST_F(PortAllocatorTest, TestDisableAdapterEnumerationBehindNat) { |
459 AddInterface(kClientAddr); | 513 AddInterface(kClientAddr); |
460 // GTURN is not configured here. | 514 // GTURN is not configured here. |
461 ResetWithNatServer(kStunAddr); | 515 ResetWithNatServer(kStunAddr); |
462 AddTurnServers(kTurnUdpIntAddr, rtc::SocketAddress()); | 516 AddTurnServers(kTurnUdpIntAddr, rtc::SocketAddress()); |
463 | 517 // Expect to see 3 ports: STUN, TURN/UDP and TCP ports, and both STUN and |
464 CheckDisableAdapterEnumeration(); | 518 // TURN/UDP candidates. |
519 CheckDisableAdapterEnumeration(3U, true, kNatUdpAddr.ipaddr(), true, false); | |
465 } | 520 } |
466 | 521 |
467 // Test that even with multiple interfaces, the result should be only 1 Stun | 522 // Test that even with multiple interfaces, the result should still be one STUN |
468 // candidate since we bind to any address (i.e. all 0s). | 523 // and one TURN candidate since we bind to any address (i.e. all 0s). |
469 TEST_F(PortAllocatorTest, TestDisableAdapterEnumerationMultipleInterfaces) { | 524 TEST_F(PortAllocatorTest, |
525 TestDisableAdapterEnumerationBehindNatMultipleInterfaces) { | |
470 AddInterface(kPrivateAddr); | 526 AddInterface(kPrivateAddr); |
471 AddInterface(kPrivateAddr2); | 527 AddInterface(kPrivateAddr2); |
472 ResetWithNatServer(kStunAddr); | 528 ResetWithNatServer(kStunAddr); |
473 AddTurnServers(kTurnUdpIntAddr, rtc::SocketAddress()); | 529 AddTurnServers(kTurnUdpIntAddr, rtc::SocketAddress()); |
530 // Expect to see 3 ports: STUN, TURN/UDP and TCP ports, and both STUN and | |
531 // TURN/UDP candidates. | |
532 CheckDisableAdapterEnumeration(3U, true, kNatUdpAddr.ipaddr(), true, false); | |
533 } | |
474 | 534 |
475 CheckDisableAdapterEnumeration(); | 535 // Test that we should get STUN, TURN/UDP and TURN/TCP candidates when a |
536 // TURN/TCP server is specified. | |
537 TEST_F(PortAllocatorTest, TestDisableAdapterEnumerationBehindNatWithTcp) { | |
538 turn_server_.AddInternalSocket(kTurnTcpIntAddr, cricket::PROTO_TCP); | |
539 AddInterface(kClientAddr); | |
540 // GTURN is not configured here. | |
541 ResetWithNatServer(kStunAddr); | |
542 AddTurnServers(kTurnUdpIntAddr, kTurnTcpIntAddr); | |
543 // Expect to see 4 ports - STUN, TURN/UDP, TURN/TCP and TCP port. STUN, | |
544 // TURN/UDP, and TURN/TCP candidates. | |
545 CheckDisableAdapterEnumeration(4U, true, kNatUdpAddr.ipaddr(), true, true); | |
546 } | |
547 | |
548 // Test that we should only get STUN and TURN candidates when adapter | |
549 // enumeration is disabled. Since the endpoint is not behind NAT, the srflx | |
550 // address should be the public client interface. | |
551 TEST_F(PortAllocatorTest, TestDisableAdapterEnumerationWithoutNat) { | |
552 AddInterfaceAsDefaultRoute(kClientAddr); | |
553 ResetWithStunServer(kStunAddr); | |
554 AddTurnServers(kTurnUdpIntAddr, rtc::SocketAddress()); | |
555 // Expect to see 3 ports: STUN, TURN/UDP and TCP ports, but only both STUN and | |
556 // TURN candidates. The STUN candidate should have kClientAddr as srflx | |
557 // address, and TURN candidate with kClientAddr as the related address. | |
558 CheckDisableAdapterEnumeration(3U, true, kClientAddr.ipaddr(), true, false); | |
559 } | |
560 | |
561 // Test that when adapter enumeration is disabled, for endpoints without | |
562 // STUN/TURN specified, no candidate is generated. | |
563 TEST_F(PortAllocatorTest, TestDisableAdapterEnumerationWithoutNat_NoCandidate) { | |
juberti1
2015/08/13 21:23:59
Call this ...WithoutNatOrServers
guoweis_webrtc
2015/08/14 05:24:25
Done.
| |
564 AddInterfaceAsDefaultRoute(kClientAddr); | |
565 ResetWithNoServers(); | |
566 // Expect to see 2 ports: STUN and TCP ports, but no candidate. | |
567 CheckDisableAdapterEnumeration(2U, false, rtc::IPAddress(), false, false); | |
476 } | 568 } |
477 | 569 |
478 // Disable for asan, see | 570 // Disable for asan, see |
479 // https://code.google.com/p/webrtc/issues/detail?id=4743 for details. | 571 // https://code.google.com/p/webrtc/issues/detail?id=4743 for details. |
480 #if !defined(ADDRESS_SANITIZER) | 572 #if !defined(ADDRESS_SANITIZER) |
481 | 573 |
482 // Test that we can get OnCandidatesAllocationDone callback when all the ports | 574 // Test that we can get OnCandidatesAllocationDone callback when all the ports |
483 // are disabled. | 575 // are disabled. |
484 TEST_F(PortAllocatorTest, TestDisableAllPorts) { | 576 TEST_F(PortAllocatorTest, TestDisableAllPorts) { |
485 AddInterface(kClientAddr); | 577 AddInterface(kClientAddr); |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1184 AllocationSequenceForTest alloc_sequence( | 1276 AllocationSequenceForTest alloc_sequence( |
1185 static_cast<cricket::BasicPortAllocatorSession*>(session_.get()), | 1277 static_cast<cricket::BasicPortAllocatorSession*>(session_.get()), |
1186 &network1, &config, flag); | 1278 &network1, &config, flag); |
1187 // This simply tests it will not crash if udp_socket_ in the | 1279 // This simply tests it will not crash if udp_socket_ in the |
1188 // AllocationSequence is null, which is chosen in the constructor. | 1280 // AllocationSequence is null, which is chosen in the constructor. |
1189 cricket::RelayServerConfig relay_server(cricket::RELAY_TURN); | 1281 cricket::RelayServerConfig relay_server(cricket::RELAY_TURN); |
1190 relay_server.ports.push_back( | 1282 relay_server.ports.push_back( |
1191 cricket::ProtocolAddress(kTurnUdpIntAddr, cricket::PROTO_UDP, false)); | 1283 cricket::ProtocolAddress(kTurnUdpIntAddr, cricket::PROTO_UDP, false)); |
1192 alloc_sequence.CreateTurnPort(relay_server); | 1284 alloc_sequence.CreateTurnPort(relay_server); |
1193 } | 1285 } |
OLD | NEW |