You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2019/05/17 16:40:02 UTC

[trafficserver] branch master updated: Remove f_callback_on_accept This isn't used, and causes clang analyzer problems.

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

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 4b43841  Remove f_callback_on_accept This isn't used, and causes clang analyzer problems.
4b43841 is described below

commit 4b4384166e3a614c7abd9ce5ec4fea58c91bd258
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Fri May 17 09:17:39 2019 -0500

    Remove f_callback_on_accept
    This isn't used, and causes clang analyzer problems.
---
 iocore/net/I_NetProcessor.h    | 5 +----
 iocore/net/UnixNetAccept.cc    | 9 ---------
 iocore/net/UnixNetProcessor.cc | 5 -----
 proxy/shared/UglyLogStubs.cc   | 1 -
 4 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/iocore/net/I_NetProcessor.h b/iocore/net/I_NetProcessor.h
index da70488..bf97639 100644
--- a/iocore/net/I_NetProcessor.h
+++ b/iocore/net/I_NetProcessor.h
@@ -64,10 +64,7 @@ public:
         @c NET_EVENT_ACCEPT_SUCCEED
         or @c NET_EVENT_ACCEPT_FAILED on success and failure resp.
     */
-    bool f_callback_on_open;
-    /** Accept only on the loopback address.
-        Default: @c false.
-     */
+
     bool localhost_only;
     /// Are frequent accepts expected?
     /// Default: @c false.
diff --git a/iocore/net/UnixNetAccept.cc b/iocore/net/UnixNetAccept.cc
index a936c5e..c10c03d 100644
--- a/iocore/net/UnixNetAccept.cc
+++ b/iocore/net/UnixNetAccept.cc
@@ -260,15 +260,6 @@ NetAccept::do_listen(bool non_blocking)
     }
   }
 
-  if (opt.f_callback_on_open && !action_->cancelled) {
-    if (res) {
-      action_->continuation->handleEvent(NET_EVENT_ACCEPT_FAILED, this);
-    } else {
-      action_->continuation->handleEvent(NET_EVENT_ACCEPT_SUCCEED, this);
-    }
-    mutex = nullptr;
-  }
-
   return res;
 }
 
diff --git a/iocore/net/UnixNetProcessor.cc b/iocore/net/UnixNetProcessor.cc
index c18e6bd..fd3b368 100644
--- a/iocore/net/UnixNetProcessor.cc
+++ b/iocore/net/UnixNetProcessor.cc
@@ -41,7 +41,6 @@ NetProcessor::AcceptOptions::reset()
   accept_threads        = -1;
   ip_family             = AF_INET;
   etype                 = ET_NET;
-  f_callback_on_open    = false;
   localhost_only        = false;
   frequent_accept       = true;
   backdoor              = false;
@@ -137,10 +136,6 @@ UnixNetProcessor::accept_internal(Continuation *cont, int fd, AcceptOptions cons
   *na->action_        = cont;
   na->action_->server = &na->server;
 
-  if (na->opt.f_callback_on_open) {
-    na->mutex = cont->mutex;
-  }
-
   if (opt.frequent_accept) { // true
     if (accept_threads > 0) {
       na->init_accept_loop();
diff --git a/proxy/shared/UglyLogStubs.cc b/proxy/shared/UglyLogStubs.cc
index 6952389..f30b954 100644
--- a/proxy/shared/UglyLogStubs.cc
+++ b/proxy/shared/UglyLogStubs.cc
@@ -107,7 +107,6 @@ NetProcessor::AcceptOptions::reset()
   accept_threads        = 0;
   ip_family             = AF_INET;
   etype                 = ET_NET;
-  f_callback_on_open    = false;
   recv_bufsize          = 0;
   send_bufsize          = 0;
   sockopt_flags         = 0;