(Auto)update libjingle 75852725-> 75853560
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7231 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
0b435ba597
commit
dcc1f0426b
@ -431,7 +431,11 @@ void BasicPortAllocatorSession::DoAllocate() {
|
||||
}
|
||||
|
||||
if (!(sequence_flags & PORTALLOCATOR_ENABLE_IPV6) &&
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
networks[i]->GetBestIP().family() == AF_INET6) {
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
networks[i]->ip().family() == AF_INET6) {
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
// Skip IPv6 networks unless the flag's been set.
|
||||
continue;
|
||||
}
|
||||
@ -728,7 +732,12 @@ AllocationSequence::AllocationSequence(BasicPortAllocatorSession* session,
|
||||
uint32 flags)
|
||||
: session_(session),
|
||||
network_(network),
|
||||
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
ip_(network->GetBestIP()),
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
ip_(network->ip()),
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
config_(config),
|
||||
state_(kInit),
|
||||
flags_(flags),
|
||||
@ -771,7 +780,11 @@ AllocationSequence::~AllocationSequence() {
|
||||
|
||||
void AllocationSequence::DisableEquivalentPhases(rtc::Network* network,
|
||||
PortConfiguration* config, uint32* flags) {
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
if (!((network == network_) && (ip_ == network->GetBestIP()))) {
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
if (!((network == network_) && (ip_ == network->ip()))) {
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
// Different network setup; nothing is equivalent.
|
||||
return;
|
||||
}
|
||||
|
@ -239,7 +239,11 @@ void ConnectivityChecker::OnRequestDone(rtc::AsyncHttpRequest* request) {
|
||||
}
|
||||
rtc::ProxyInfo proxy_info = request->proxy();
|
||||
NicMap::iterator i =
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
nics_.find(NicId(networks[0]->GetBestIP(), proxy_info.address));
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
nics_.find(NicId(networks[0]->ip(), proxy_info.address));
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
if (i != nics_.end()) {
|
||||
int port = request->port();
|
||||
uint32 now = rtc::Time();
|
||||
@ -272,7 +276,11 @@ void ConnectivityChecker::OnRelayPortComplete(Port* port) {
|
||||
ASSERT(worker_ == rtc::Thread::Current());
|
||||
RelayPort* relay_port = reinterpret_cast<RelayPort*>(port);
|
||||
const ProtocolAddress* address = relay_port->ServerAddress(0);
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
rtc::IPAddress ip = port->Network()->GetBestIP();
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
rtc::IPAddress ip = port->Network()->ip();
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
NicMap::iterator i = nics_.find(NicId(ip, port->proxy().address));
|
||||
if (i != nics_.end()) {
|
||||
// We have it already, add the new information.
|
||||
@ -306,7 +314,11 @@ void ConnectivityChecker::OnStunPortComplete(Port* port) {
|
||||
ASSERT(worker_ == rtc::Thread::Current());
|
||||
const std::vector<Candidate> candidates = port->Candidates();
|
||||
Candidate c = candidates[0];
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
rtc::IPAddress ip = port->Network()->GetBestIP();
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
rtc::IPAddress ip = port->Network()->ip();
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
NicMap::iterator i = nics_.find(NicId(ip, port->proxy().address));
|
||||
if (i != nics_.end()) {
|
||||
// We have it already, add the new information.
|
||||
@ -325,7 +337,11 @@ void ConnectivityChecker::OnStunPortComplete(Port* port) {
|
||||
void ConnectivityChecker::OnStunPortError(Port* port) {
|
||||
ASSERT(worker_ == rtc::Thread::Current());
|
||||
LOG(LS_ERROR) << "Stun address error.";
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
rtc::IPAddress ip = port->Network()->GetBestIP();
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
rtc::IPAddress ip = port->Network()->ip();
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
NicMap::iterator i = nics_.find(NicId(ip, port->proxy().address));
|
||||
if (i != nics_.end()) {
|
||||
// We have it already, add the new information.
|
||||
@ -365,7 +381,11 @@ StunPort* ConnectivityChecker::CreateStunPort(
|
||||
return StunPort::Create(worker_,
|
||||
socket_factory_.get(),
|
||||
network,
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
network->GetBestIP(),
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
network->ip(),
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
0,
|
||||
0,
|
||||
username,
|
||||
@ -379,7 +399,11 @@ RelayPort* ConnectivityChecker::CreateRelayPort(
|
||||
return RelayPort::Create(worker_,
|
||||
socket_factory_.get(),
|
||||
network,
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
network->GetBestIP(),
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
network->ip(),
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
port_allocator_->min_port(),
|
||||
port_allocator_->max_port(),
|
||||
username,
|
||||
@ -400,7 +424,11 @@ void ConnectivityChecker::CreateRelayPorts(
|
||||
relay != config->relays.end(); ++relay) {
|
||||
for (uint32 i = 0; i < networks.size(); ++i) {
|
||||
NicMap::iterator iter =
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
nics_.find(NicId(networks[i]->GetBestIP(), proxy_info.address));
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
nics_.find(NicId(networks[i]->ip(), proxy_info.address));
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
if (iter != nics_.end()) {
|
||||
// TODO: Now setting the same start time for all protocols.
|
||||
// This might affect accuracy, but since we are mainly looking for
|
||||
@ -457,7 +485,11 @@ void ConnectivityChecker::AllocatePorts() {
|
||||
rtc::ProxyInfo proxy_info = GetProxyInfo();
|
||||
bool allocate_relay_ports = false;
|
||||
for (uint32 i = 0; i < networks.size(); ++i) {
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
if (AddNic(networks[i]->GetBestIP(), proxy_info.address)) {
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
if (AddNic(networks[i]->ip(), proxy_info.address)) {
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
Port* port = CreateStunPort(username, password, &config, networks[i]);
|
||||
if (port) {
|
||||
|
||||
@ -535,7 +567,11 @@ void ConnectivityChecker::RegisterHttpStart(int port) {
|
||||
}
|
||||
rtc::ProxyInfo proxy_info = GetProxyInfo();
|
||||
NicMap::iterator i =
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
nics_.find(NicId(networks[0]->GetBestIP(), proxy_info.address));
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
nics_.find(NicId(networks[0]->ip(), proxy_info.address));
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
if (i != nics_.end()) {
|
||||
uint32 now = rtc::Time();
|
||||
NicInfo* nic_info = &i->second;
|
||||
|
@ -238,7 +238,11 @@ class ConnectivityCheckerForTest : public ConnectivityChecker {
|
||||
return new FakeStunPort(worker(),
|
||||
socket_factory_,
|
||||
network,
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
network->GetBestIP(),
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
network->ip(),
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
kMinPort,
|
||||
kMaxPort,
|
||||
username,
|
||||
@ -251,7 +255,11 @@ class ConnectivityCheckerForTest : public ConnectivityChecker {
|
||||
return new FakeRelayPort(worker(),
|
||||
socket_factory_,
|
||||
network,
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
network->GetBestIP(),
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
network->ip(),
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
kMinPort,
|
||||
kMaxPort,
|
||||
username,
|
||||
|
@ -65,7 +65,11 @@ class FakePortAllocatorSession : public PortAllocatorSession {
|
||||
port_.reset(cricket::UDPPort::Create(worker_thread_,
|
||||
factory_,
|
||||
&network_,
|
||||
#ifdef USE_WEBRTC_DEV_BRANCH
|
||||
network_.GetBestIP(),
|
||||
#else // USE_WEBRTC_DEV_BRANCH
|
||||
network_.ip(),
|
||||
#endif // USE_WEBRTC_DEV_BRANCH
|
||||
0,
|
||||
0,
|
||||
username(),
|
||||
|
Loading…
Reference in New Issue
Block a user