| 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 port2->SetIceRole(cricket::ICEROLE_CONTROLLED); | 449 port2->SetIceRole(cricket::ICEROLE_CONTROLLED); |
| 450 TestConnectivity("ssltcp", port1, RelayName(rtype, proto), port2, | 450 TestConnectivity("ssltcp", port1, RelayName(rtype, proto), port2, |
| 451 rtype == RELAY_GTURN, false, true, true); | 451 rtype == RELAY_GTURN, false, true, true); |
| 452 } | 452 } |
| 453 // helpers for above functions | 453 // helpers for above functions |
| 454 UDPPort* CreateUdpPort(const SocketAddress& addr) { | 454 UDPPort* CreateUdpPort(const SocketAddress& addr) { |
| 455 return CreateUdpPort(addr, &socket_factory_); | 455 return CreateUdpPort(addr, &socket_factory_); |
| 456 } | 456 } |
| 457 UDPPort* CreateUdpPort(const SocketAddress& addr, | 457 UDPPort* CreateUdpPort(const SocketAddress& addr, |
| 458 PacketSocketFactory* socket_factory) { | 458 PacketSocketFactory* socket_factory) { |
| 459 return UDPPort::Create(main_, socket_factory, &network_, | 459 return UDPPort::Create(main_, socket_factory, &network_, addr.ipaddr(), 0, |
| 460 addr.ipaddr(), 0, 0, username_, password_, | 460 0, username_, password_, std::string(), true); |
| 461 std::string(), false); | |
| 462 } | 461 } |
| 463 TCPPort* CreateTcpPort(const SocketAddress& addr) { | 462 TCPPort* CreateTcpPort(const SocketAddress& addr) { |
| 464 return CreateTcpPort(addr, &socket_factory_); | 463 return CreateTcpPort(addr, &socket_factory_); |
| 465 } | 464 } |
| 466 TCPPort* CreateTcpPort(const SocketAddress& addr, | 465 TCPPort* CreateTcpPort(const SocketAddress& addr, |
| 467 PacketSocketFactory* socket_factory) { | 466 PacketSocketFactory* socket_factory) { |
| 468 return TCPPort::Create(main_, socket_factory, &network_, | 467 return TCPPort::Create(main_, socket_factory, &network_, |
| 469 addr.ipaddr(), 0, 0, username_, password_, | 468 addr.ipaddr(), 0, 0, username_, password_, |
| 470 true); | 469 true); |
| 471 } | 470 } |
| (...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2443 StartConnectAndStopChannels(&ch1, &ch2); | 2442 StartConnectAndStopChannels(&ch1, &ch2); |
| 2444 // Switch the role after all connections are destroyed. | 2443 // Switch the role after all connections are destroyed. |
| 2445 EXPECT_TRUE_WAIT(ch2.conn() == nullptr, kTimeout); | 2444 EXPECT_TRUE_WAIT(ch2.conn() == nullptr, kTimeout); |
| 2446 port1->SetIceRole(cricket::ICEROLE_CONTROLLED); | 2445 port1->SetIceRole(cricket::ICEROLE_CONTROLLED); |
| 2447 port2->SetIceRole(cricket::ICEROLE_CONTROLLING); | 2446 port2->SetIceRole(cricket::ICEROLE_CONTROLLING); |
| 2448 | 2447 |
| 2449 // After the connection is destroyed, the port should not be destroyed. | 2448 // After the connection is destroyed, the port should not be destroyed. |
| 2450 rtc::Thread::Current()->ProcessMessages(kTimeout); | 2449 rtc::Thread::Current()->ProcessMessages(kTimeout); |
| 2451 EXPECT_FALSE(destroyed()); | 2450 EXPECT_FALSE(destroyed()); |
| 2452 } | 2451 } |
| OLD | NEW |