This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit baf225f48411f3a2052706296f6b731bcbc2ee02
Author: Alan M. Carroll <a...@apache.org>
AuthorDate: Mon Mar 15 19:31:46 2021 -0500

    Remove UnixNetVConnection::startEvent - not actually called. (#7596)
    
    (cherry picked from commit a56638f8ba92c48e2cc8b677438c36e13f393e2b)
---
 iocore/net/P_QUICNetVConnection.h |  1 -
 iocore/net/P_UnixNetVConnection.h |  1 -
 iocore/net/QUICNetProcessor.cc    |  1 -
 iocore/net/QUICNetVConnection.cc  | 20 --------------------
 iocore/net/SSLNetVConnection.cc   |  1 -
 iocore/net/UnixNetVConnection.cc  | 22 +---------------------
 6 files changed, 1 insertion(+), 45 deletions(-)

diff --git a/iocore/net/P_QUICNetVConnection.h 
b/iocore/net/P_QUICNetVConnection.h
index f04f32d..a9cde60 100644
--- a/iocore/net/P_QUICNetVConnection.h
+++ b/iocore/net/P_QUICNetVConnection.h
@@ -166,7 +166,6 @@ public:
   int connectUp(EThread *t, int fd) override;
 
   // QUICNetVConnection
-  int startEvent(int event, Event *e);
   int state_pre_handshake(int event, Event *data);
   int state_handshake(int event, Event *data);
   int state_connection_established(int event, Event *data);
diff --git a/iocore/net/P_UnixNetVConnection.h 
b/iocore/net/P_UnixNetVConnection.h
index ea08c68..0fffdcb 100644
--- a/iocore/net/P_UnixNetVConnection.h
+++ b/iocore/net/P_UnixNetVConnection.h
@@ -291,7 +291,6 @@ public:
   bool from_accept_thread  = false;
   NetAccept *accept_object = nullptr;
 
-  int startEvent(int event, Event *e);
   int acceptEvent(int event, Event *e);
   int mainEvent(int event, Event *e);
   virtual int connectUp(EThread *t, int fd);
diff --git a/iocore/net/QUICNetProcessor.cc b/iocore/net/QUICNetProcessor.cc
index 5bdaa2b..edb5110 100644
--- a/iocore/net/QUICNetProcessor.cc
+++ b/iocore/net/QUICNetProcessor.cc
@@ -149,7 +149,6 @@ QUICNetProcessor::connect_re(Continuation *cont, sockaddr 
const *remote_addr, Ne
   // Setup QUICNetVConnection
   QUICConnectionId client_dst_cid;
   client_dst_cid.randomize();
-  // vc->init set handler of vc `QUICNetVConnection::startEvent`
   vc->init(QUIC_SUPPORTED_VERSIONS[0], client_dst_cid, client_dst_cid, con, 
packet_handler, this->_rtable);
   packet_handler->init(vc);
 
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 9b2b33d..65e925f 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -242,7 +242,6 @@ void
 QUICNetVConnection::init(QUICVersion version, QUICConnectionId peer_cid, 
QUICConnectionId original_cid, UDPConnection *udp_con,
                          QUICPacketHandler *packet_handler, 
QUICResetTokenTable *rtable)
 {
-  SET_HANDLER((NetVConnHandler)&QUICNetVConnection::startEvent);
   this->_initial_version             = version;
   this->_udp_con                     = udp_con;
   this->_packet_handler              = packet_handler;
@@ -389,25 +388,6 @@ QUICNetVConnection::acceptEvent(int event, Event *e)
   return EVENT_DONE;
 }
 
-int
-QUICNetVConnection::startEvent(int event, Event *e)
-{
-  ink_assert(event == EVENT_IMMEDIATE);
-  MUTEX_TRY_LOCK(lock, get_NetHandler(e->ethread)->mutex, e->ethread);
-  if (!lock.is_locked()) {
-    e->schedule_in(HRTIME_MSECONDS(net_retry_delay));
-    return EVENT_CONT;
-  }
-
-  if (!action_.cancelled) {
-    this->connectUp(e->ethread, NO_FD);
-  } else {
-    this->free(e->ethread);
-  }
-
-  return EVENT_DONE;
-}
-
 // XXX This might be called on ET_UDP thread
 void
 QUICNetVConnection::start()
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index e1b7d99..e5f6bf1 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -971,7 +971,6 @@ SSLNetVConnection::free(EThread *t)
   early_data_buf    = nullptr;
 
   clear();
-  SET_CONTINUATION_HANDLER(this, 
(SSLNetVConnHandler)&SSLNetVConnection::startEvent);
   ink_assert(con.fd == NO_FD);
   ink_assert(t == this_ethread());
 
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index 2d8f44f..045f54b 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -896,10 +896,7 @@ UnixNetVConnection::reenable_re(VIO *vio)
   }
 }
 
-UnixNetVConnection::UnixNetVConnection()
-{
-  SET_HANDLER((NetVConnHandler)&UnixNetVConnection::startEvent);
-}
+UnixNetVConnection::UnixNetVConnection() {}
 
 // Private methods
 
@@ -1063,22 +1060,6 @@ UnixNetVConnection::netActivity(EThread *lthread)
 }
 
 int
-UnixNetVConnection::startEvent(int /* event ATS_UNUSED */, Event *e)
-{
-  MUTEX_TRY_LOCK(lock, get_NetHandler(e->ethread)->mutex, e->ethread);
-  if (!lock.is_locked()) {
-    e->schedule_in(HRTIME_MSECONDS(net_retry_delay));
-    return EVENT_CONT;
-  }
-  if (!action_.cancelled) {
-    connectUp(e->ethread, NO_FD);
-  } else {
-    free(e->ethread);
-  }
-  return EVENT_DONE;
-}
-
-int
 UnixNetVConnection::acceptEvent(int event, Event *e)
 {
   EThread *t    = (e == nullptr) ? this_ethread() : e->ethread;
@@ -1370,7 +1351,6 @@ UnixNetVConnection::free(EThread *t)
   con.close();
 
   clear();
-  SET_CONTINUATION_HANDLER(this, 
(NetVConnHandler)&UnixNetVConnection::startEvent);
   ink_assert(con.fd == NO_FD);
   ink_assert(t == this_ethread());
 

Reply via email to