From d44532afb706b423621bd761fbeb06a45e4b3f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Thu, 18 Feb 2021 14:38:14 +0100 Subject: [PATCH] Delete unused sigslot SignalAddressReady and MSG_ID_ADDRESS_BOUND Followup to https://webrtc-review.googlesource.com/c/src/+/207181 Bug: webrtc:11567 Change-Id: I604232eda0d5df7d9fe070926a37a4496924c637 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208280 Reviewed-by: Harald Alvestrand Commit-Queue: Niels Moller Cr-Commit-Position: refs/heads/master@{#33317} --- rtc_base/virtual_socket_server.cc | 11 +---------- rtc_base/virtual_socket_server.h | 3 --- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/rtc_base/virtual_socket_server.cc b/rtc_base/virtual_socket_server.cc index 5b0d3afc73..043d15a082 100644 --- a/rtc_base/virtual_socket_server.cc +++ b/rtc_base/virtual_socket_server.cc @@ -54,7 +54,6 @@ const int NUM_SAMPLES = 1000; enum { MSG_ID_PACKET, - MSG_ID_ADDRESS_BOUND, MSG_ID_CONNECT, MSG_ID_DISCONNECT, MSG_ID_SIGNALREADEVENT, @@ -377,8 +376,6 @@ void VirtualSocket::OnMessage(Message* pmsg) { SignalCloseEvent(this, error); } } - } else if (pmsg->message_id == MSG_ID_ADDRESS_BOUND) { - SignalAddressReady(this, GetLocalAddress()); } else if (pmsg->message_id == MSG_ID_SIGNALREADEVENT) { if (!recv_buffer_.empty()) { SignalReadEvent(this); @@ -696,13 +693,7 @@ int VirtualSocketServer::Bind(VirtualSocket* socket, SocketAddress normalized(addr.ipaddr().Normalized(), addr.port()); AddressMap::value_type entry(normalized, socket); - if (bindings_->insert(entry).second) { - // Post a message here such that test case could have chance to - // process the local address. (i.e. SetAlternativeLocalAddress). - msg_queue_->Post(RTC_FROM_HERE, socket, MSG_ID_ADDRESS_BOUND); - return 0; - } - return -1; + return bindings_->insert(entry).second ? 0 : -1; } int VirtualSocketServer::Bind(VirtualSocket* socket, SocketAddress* addr) { diff --git a/rtc_base/virtual_socket_server.h b/rtc_base/virtual_socket_server.h index cec52250f2..a6e1f642aa 100644 --- a/rtc_base/virtual_socket_server.h +++ b/rtc_base/virtual_socket_server.h @@ -369,9 +369,6 @@ class VirtualSocket : public AsyncSocket, // Removes stale packets from the network. Returns current size. size_t PurgeNetworkPackets(int64_t cur_time); - // For testing purpose only. Fired when client socket is bound to an address. - sigslot::signal2 SignalAddressReady; - private: struct NetworkEntry { size_t size;