From 2758c664b434c5af5bb2e8ecd577f831f173408c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Bostr=C3=B6m?= Date: Mon, 13 Feb 2017 20:33:27 -0500 Subject: [PATCH] Fix the build break by keeping the old Port::AddAddress method since the downstream application depends on it. Mark the old Port::AddAddress deprecated and will be removed after the applications stop replying on it. BUG=None. R=deadbeef@webrtc.org Review-Url: https://codereview.webrtc.org/2694103003 . Cr-Commit-Position: refs/heads/master@{#16598} --- webrtc/p2p/base/port.cc | 14 ++++++++++++++ webrtc/p2p/base/port.h | 13 +++++++++++++ 2 files changed, 27 insertions(+) diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc index 9c4c362257..bf57cf9568 100644 --- a/webrtc/p2p/base/port.cc +++ b/webrtc/p2p/base/port.cc @@ -243,6 +243,20 @@ Connection* Port::GetConnection(const rtc::SocketAddress& remote_addr) { return NULL; } +void Port::AddAddress(const rtc::SocketAddress& address, + const rtc::SocketAddress& base_address, + const rtc::SocketAddress& related_address, + const std::string& protocol, + const std::string& relay_protocol, + const std::string& tcptype, + const std::string& type, + uint32_t type_preference, + uint32_t relay_preference, + bool final) { + AddAddress(address, base_address, related_address, protocol, relay_protocol, + tcptype, type, type_preference, relay_preference, "", final); +} + void Port::AddAddress(const rtc::SocketAddress& address, const rtc::SocketAddress& base_address, const rtc::SocketAddress& related_address, diff --git a/webrtc/p2p/base/port.h b/webrtc/p2p/base/port.h index ba30c480f9..f6900210f4 100644 --- a/webrtc/p2p/base/port.h +++ b/webrtc/p2p/base/port.h @@ -323,6 +323,19 @@ class Port : public PortInterface, public rtc::MessageHandler, void set_type(const std::string& type) { type_ = type; } + // Deprecated. Use the AddAddress() method below with "url" instead. + // TODO(zhihuang): Remove this after downstream applications stop using it. + void AddAddress(const rtc::SocketAddress& address, + const rtc::SocketAddress& base_address, + const rtc::SocketAddress& related_address, + const std::string& protocol, + const std::string& relay_protocol, + const std::string& tcptype, + const std::string& type, + uint32_t type_preference, + uint32_t relay_preference, + bool final); + void AddAddress(const rtc::SocketAddress& address, const rtc::SocketAddress& base_address, const rtc::SocketAddress& related_address,