summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbuildbot@webrtc.org <buildbot@webrtc.org>2014-09-18 23:14:12 +0000
committerbuildbot@webrtc.org <buildbot@webrtc.org>2014-09-18 23:14:12 +0000
commit4318280f56990bbbd758f6f5e49b5719100f9951 (patch)
treeb4360776ed12e02973e05077cde9901680d1f6cc
parent637a5ca28768be536b65d4cc6a4a7d3ea988c310 (diff)
downloadtalk-4318280f56990bbbd758f6f5e49b5719100f9951.tar.gz
(Auto)update libjingle 75852725-> 75853560
git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@7231 4adac7df-926f-26a2-2b94-8c16560cd09d
-rw-r--r--p2p/client/basicportallocator.cc13
-rw-r--r--p2p/client/connectivitychecker.cc36
-rw-r--r--p2p/client/connectivitychecker_unittest.cc8
-rw-r--r--p2p/client/fakeportallocator.h4
4 files changed, 61 insertions, 0 deletions
diff --git a/p2p/client/basicportallocator.cc b/p2p/client/basicportallocator.cc
index 9ca873b..0ec13e7 100644
--- a/p2p/client/basicportallocator.cc
+++ b/p2p/client/basicportallocator.cc
@@ -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;
}
diff --git a/p2p/client/connectivitychecker.cc b/p2p/client/connectivitychecker.cc
index 935c4b3..723c5a1 100644
--- a/p2p/client/connectivitychecker.cc
+++ b/p2p/client/connectivitychecker.cc
@@ -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;
diff --git a/p2p/client/connectivitychecker_unittest.cc b/p2p/client/connectivitychecker_unittest.cc
index 54369c5..187505a 100644
--- a/p2p/client/connectivitychecker_unittest.cc
+++ b/p2p/client/connectivitychecker_unittest.cc
@@ -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,
diff --git a/p2p/client/fakeportallocator.h b/p2p/client/fakeportallocator.h
index 4441a2f..e1a04dd 100644
--- a/p2p/client/fakeportallocator.h
+++ b/p2p/client/fakeportallocator.h
@@ -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(),