Get rid of deprecated SocketAddress::IsAny() method.
This patch converts the usage of IsAny() to IsAnyIP() and removes the deprecated method. BUG=None R=pthatcher@webrtc.org Review URL: https://codereview.webrtc.org/1392153002 Cr-Commit-Position: refs/heads/master@{#10220}
This commit is contained in:
parent
c671139ef2
commit
8ac544e811
@ -400,7 +400,7 @@ class PhysicalSocket : public AsyncSocket, public sigslot::has_slots<> {
|
||||
|
||||
int EstimateMTU(uint16_t* mtu) override {
|
||||
SocketAddress addr = GetRemoteAddress();
|
||||
if (addr.IsAny()) {
|
||||
if (addr.IsAnyIP()) {
|
||||
SetError(ENOTCONN);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -128,7 +128,6 @@ class SocketAddress {
|
||||
// That is, 0.0.0.0 or ::.
|
||||
// Hostname and/or port may be set.
|
||||
bool IsAnyIP() const;
|
||||
inline bool IsAny() const { return IsAnyIP(); } // deprecated
|
||||
|
||||
// Determines whether the IP address refers to a loopback address.
|
||||
// For v4 addresses this means the address is in the range 127.0.0.0/8.
|
||||
|
||||
@ -385,7 +385,7 @@ int VirtualSocket::EstimateMTU(uint16_t* mtu) {
|
||||
|
||||
void VirtualSocket::OnMessage(Message* pmsg) {
|
||||
if (pmsg->message_id == MSG_ID_PACKET) {
|
||||
// ASSERT(!local_addr_.IsAny());
|
||||
// ASSERT(!local_addr_.IsAnyIP());
|
||||
ASSERT(NULL != pmsg->pdata);
|
||||
Packet* packet = static_cast<Packet*>(pmsg->pdata);
|
||||
|
||||
|
||||
@ -514,7 +514,7 @@ int Win32Socket::Close() {
|
||||
|
||||
int Win32Socket::EstimateMTU(uint16_t* mtu) {
|
||||
SocketAddress addr = GetRemoteAddress();
|
||||
if (addr.IsAny()) {
|
||||
if (addr.IsAnyIP()) {
|
||||
error_ = ENOTCONN;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ void Transport::CallChannels(TransportChannelFunc func) {
|
||||
|
||||
bool Transport::VerifyCandidate(const Candidate& cand, std::string* error) {
|
||||
// No address zero.
|
||||
if (cand.address().IsNil() || cand.address().IsAny()) {
|
||||
if (cand.address().IsNil() || cand.address().IsAnyIP()) {
|
||||
*error = "candidate has address of zero";
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user