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