trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject git commit: TS-1884: remove more deprecated IPv4-only
Date Thu, 09 May 2013 16:31:20 GMT
Updated Branches:
  refs/heads/master b0b1bbdcf -> 1490f9f8a


TS-1884: remove more deprecated IPv4-only


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/1490f9f8
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/1490f9f8
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/1490f9f8

Branch: refs/heads/master
Commit: 1490f9f8ad3428ef00b77957be007cb6579149ab
Parents: b0b1bbd
Author: James Peach <jpeach@apache.org>
Authored: Thu May 9 09:30:50 2013 -0700
Committer: James Peach <jpeach@apache.org>
Committed: Thu May 9 09:30:50 2013 -0700

----------------------------------------------------------------------
 iocore/cluster/ClusterConfig.cc       |   19 +++++++-------
 iocore/eventsystem/I_ProxyAllocator.h |   12 ++++++---
 iocore/net/I_NetProcessor.h           |   37 ----------------------------
 iocore/net/P_Connection.h             |   25 -------------------
 iocore/net/P_NetAccept.h              |    1 -
 5 files changed, 18 insertions(+), 76 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1490f9f8/iocore/cluster/ClusterConfig.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterConfig.cc b/iocore/cluster/ClusterConfig.cc
index c3538de..c901a15 100644
--- a/iocore/cluster/ClusterConfig.cc
+++ b/iocore/cluster/ClusterConfig.cc
@@ -101,15 +101,16 @@ ClusterAccept::ClusterAcceptEvent(int event, void *data)
           accept_action->cancel();
           accept_action = 0;
         }
-	NetProcessor::AcceptOptions opt;
-	opt.recv_bufsize = socket_recv_bufsize;
-	opt.send_bufsize = socket_send_bufsize;
-	opt.etype = ET_CLUSTER;
-	opt.local_port = cluster_port;
-	opt.ip_family = AF_INET;
-        accept_action = netProcessor.main_accept(this, NO_FD,
-                                                 NULL, NULL,
-                                                 false, false, opt);
+
+        NetProcessor::AcceptOptions opt;
+        opt.recv_bufsize = socket_recv_bufsize;
+        opt.send_bufsize = socket_send_bufsize;
+        opt.etype = ET_CLUSTER;
+        opt.local_port = cluster_port;
+        opt.ip_family = AF_INET;
+        opt.localhost_only = false;
+
+        accept_action = netProcessor.main_accept(this, NO_FD, opt);
         if (!accept_action) {
           Warning("Unable to accept cluster connections on port: %d", cluster_port);
         } else {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1490f9f8/iocore/eventsystem/I_ProxyAllocator.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_ProxyAllocator.h b/iocore/eventsystem/I_ProxyAllocator.h
index 8a589b1..4a764cb 100644
--- a/iocore/eventsystem/I_ProxyAllocator.h
+++ b/iocore/eventsystem/I_ProxyAllocator.h
@@ -82,6 +82,7 @@ thread_freeup(ClassAllocator<C> &a, ProxyAllocator & l)
 }
 
 #if defined(TS_USE_FREELIST)
+
 #define THREAD_ALLOC(_a, _t) thread_alloc(::_a, _t->_a)
 #define THREAD_ALLOC_INIT(_a, _t) thread_alloc_init(::_a, _t->_a)
 #define THREAD_FREE_TO(_p, _a, _t, _m) do { \
@@ -91,12 +92,15 @@ thread_freeup(ClassAllocator<C> &a, ProxyAllocator & l)
   if (_t->_a.allocated > _m)                \
     thread_freeup(::_a, _t->_a);            \
 } while (0)
-#else
+
+#else /* !defined(TS_USE_FREELIST) */
+
 #define THREAD_ALLOC(_a, _t) ::_a.alloc()
 #define THREAD_ALLOC_INIT(_a, _t) ::_a.alloc()
 #define THREAD_FREE_TO(_p, _a, _t, _m) ::_a.free(_p)
-#endif
-#define THREAD_FREE(_p, _a, _t) \
-        THREAD_FREE_TO(_p, _a, _t, MAX_ON_THREAD_FREELIST)
+
+#endif /* defined(TS_USE_FREELIST */
+
+#define THREAD_FREE(_p, _a, _t) THREAD_FREE_TO(_p, _a, _t, MAX_ON_THREAD_FREELIST)
 
 #endif /* _ProxyAllocator_h_ */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1490f9f8/iocore/net/I_NetProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/net/I_NetProcessor.h b/iocore/net/I_NetProcessor.h
index af5d6b0..685db5d 100644
--- a/iocore/net/I_NetProcessor.h
+++ b/iocore/net/I_NetProcessor.h
@@ -158,43 +158,6 @@ public:
   );
 
   /**
-    @deprecated preserve backward compatibility with non-IPv6 iocore
-
-    @param cont Continuation to be called back with events this
-      continuation is not locked on callbacks and so the handler must
-      be re-entrant.
-    @param listen_socket_in if passed, used for listening.
-    @param port port to bind for accept.
-    @param bound_sockaddr returns the sockaddr for the listen fd.
-    @param bound_sockaddr_size size of the sockaddr returned.
-    @param accept_only can be used to customize accept, accept a
-      connection only if there is some data to be read. This works
-      only on supported platforms (NT & Win2K currently).
-    @param recv_bufsize used to set recv buffer size for accepted
-      connections (Works only on selected platforms ??).
-    @param send_bufsize used to set send buffer size for accepted
-      connections (Works only on selected platforms ??).
-    @param sockopt_flag can be used to define additional socket option.
-    @param etype Event Thread group to accept on.
-    @param callback_on_open if true, cont is called back with
-      NET_EVENT_ACCEPT_SUCCEED, or NET_EVENT_ACCEPT_FAILED on success
-      and failure resp.
-    @return Action, that can be cancelled to cancel the accept. The
-      port becomes free immediately.
-
-  */
-  virtual Action *main_accept(Continuation * cont, SOCKET listen_socket_in,
-                              sockaddr * /* bound_sockaddr ATS_UNUSED  = NULL */,
-                              int */*bound_sockaddr_size ATS_UNUSED = NULL */,
-                              bool /* accept_only ATS_UNUSED = false */, bool localhost_only
= false,
-                              AcceptOptions const& opt = DEFAULT_ACCEPT_OPTIONS)
-  {
-    AcceptOptions new_opt = opt;
-    new_opt.localhost_only = localhost_only;
-    return main_accept(cont, listen_socket_in, new_opt);
-  }
-    
-  /**
     Open a NetVConnection for connection oriented I/O. Connects
     through sockserver if netprocessor is configured to use socks
     or is socks parameters to the call are set.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1490f9f8/iocore/net/P_Connection.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_Connection.h b/iocore/net/P_Connection.h
index 5396226..e974a37 100644
--- a/iocore/net/P_Connection.h
+++ b/iocore/net/P_Connection.h
@@ -125,17 +125,6 @@ struct Connection
     ats_ip_copy(&addr, remote_addr);
   }
 
-  /**
-    @deprecated preserve backward compatibility with non-IPv6 iocore
-  */
-  void setRemote(
-    in_addr_t ip,
-    int port
-  ) {
-	ats_ip4_set(&addr.sin, ip, htons(port));
-  }
-
-    
   int setup_mc_send(sockaddr const* mc_addr,
                     sockaddr const* my_addr,
                     bool non_blocking = NON_BLOCKING,
@@ -166,20 +155,6 @@ struct Connection
   int setup_mc_receive(sockaddr const* from,
                        bool non_blocking = NON_BLOCKING, Connection * sendchan = NULL, Continuation
* c = NULL);
 
-  /**
-   @deprecated preserve backward compatibility with non-IPv6 iocore
-  */
-
-  int setup_mc_receive(unsigned int mc_ip, int port,
-                       bool non_blocking = NON_BLOCKING, Connection * sendchan = NULL, Continuation
* c = NULL)
-  {
-    struct sockaddr_in mc_addr;
-    ats_ip4_set(&mc_addr, mc_ip, port);
-
-    return setup_mc_receive(ats_ip_sa_cast(&mc_addr), non_blocking, sendchan, c);
-  }
-
-
   int close();                  // 0 on success, -errno on failure
 
   void apply_options(NetVCOptions const& opt);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1490f9f8/iocore/net/P_NetAccept.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_NetAccept.h b/iocore/net/P_NetAccept.h
index 046faa4..3608237 100644
--- a/iocore/net/P_NetAccept.h
+++ b/iocore/net/P_NetAccept.h
@@ -88,7 +88,6 @@ struct NetAccept:public Continuation
   void *alloc_cache;
   AcceptFunctionPtr accept_fn;
   int ifd;
-  int ifd_seq_num;
   bool callback_on_open;
   Ptr<NetAcceptAction> action_;
   int recv_bufsize;


Mime
View raw message