You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2014/04/28 23:32:10 UTC

[3/6] git commit: TS-2746: rename AcceptCont to SessionAccept

TS-2746: rename AcceptCont to SessionAccept


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

Branch: refs/heads/master
Commit: 523aa13cdb3ecd61135e9997d294eeeb97b7ddce
Parents: 7b08eb8
Author: James Peach <jp...@apache.org>
Authored: Thu Apr 24 09:50:25 2014 -0700
Committer: James Peach <jp...@apache.org>
Committed: Mon Apr 28 14:19:21 2014 -0700

----------------------------------------------------------------------
 iocore/net/AcceptCont.cc             | 41 --------------------------
 iocore/net/I_AcceptCont.h            | 48 ------------------------------
 iocore/net/I_Net.h                   |  2 +-
 iocore/net/I_SessionAccept.h         | 49 +++++++++++++++++++++++++++++++
 iocore/net/Makefile.am               |  4 +--
 iocore/net/P_ProtocolAcceptCont.h    |  6 ++--
 iocore/net/P_SSLNextProtocolAccept.h |  2 +-
 iocore/net/SSLNextProtocolAccept.cc  |  2 +-
 iocore/net/SessionAccept.cc          | 41 ++++++++++++++++++++++++++
 iocore/net/UnixNetProcessor.cc       |  2 +-
 proxy/http/HttpAcceptCont.h          |  4 +--
 proxy/spdy/P_SpdyAcceptCont.h        |  2 +-
 proxy/spdy/SpdyAcceptCont.cc         |  2 +-
 13 files changed, 103 insertions(+), 102 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/iocore/net/AcceptCont.cc
----------------------------------------------------------------------
diff --git a/iocore/net/AcceptCont.cc b/iocore/net/AcceptCont.cc
deleted file mode 100644
index e112230..0000000
--- a/iocore/net/AcceptCont.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-/** @file
-
-  AcceptCont
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-#include "I_AcceptCont.h"
-#include "P_Net.h"
-
-AcceptCont::AcceptCont(ProxyMutex *amutex)
-    : Continuation(amutex)
-{
-  SET_HANDLER(&AcceptCont::mainEvent);
-}
-
-AcceptCont::~AcceptCont()
-{
-}
-
-void *
-AcceptCont::createNetAccept()
-{
-    return (NEW(new NetAccept));
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/iocore/net/I_AcceptCont.h
----------------------------------------------------------------------
diff --git a/iocore/net/I_AcceptCont.h b/iocore/net/I_AcceptCont.h
deleted file mode 100644
index 2d59e1e..0000000
--- a/iocore/net/I_AcceptCont.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/** @file
-
-  AcceptCont
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-#ifndef I_AcceptCont_H_
-#define I_AcceptCont_H_
-#include "I_Net.h"
-#include "I_VConnection.h"
-
-class AcceptCont: public Continuation
-{
-public:
-  AcceptCont(ProxyMutex *amutex);
-  ~AcceptCont();
-
-  //
-  // Virtual function allows creation of an SSLNetAccept
-  // or NetAccept transparent to NetProcessor.
-  //
-  // This function should return a pointer
-  // of NetAccept or its subclass.
-  //
-  virtual void *createNetAccept();
-
-private:
-  virtual int mainEvent(int event, void * netvc) = 0;
-};
-
-#endif /* I_AcceptCont_H_ */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/iocore/net/I_Net.h
----------------------------------------------------------------------
diff --git a/iocore/net/I_Net.h b/iocore/net/I_Net.h
index c52d041..333f24b 100644
--- a/iocore/net/I_Net.h
+++ b/iocore/net/I_Net.h
@@ -83,7 +83,7 @@ extern int net_config_poll_timeout;
 
 #include "I_NetVConnection.h"
 #include "I_NetProcessor.h"
-#include "I_AcceptCont.h"
+#include "I_SessionAccept.h"
 
 void ink_net_init(ModuleVersion version);
 #endif

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/iocore/net/I_SessionAccept.h
----------------------------------------------------------------------
diff --git a/iocore/net/I_SessionAccept.h b/iocore/net/I_SessionAccept.h
new file mode 100644
index 0000000..c7fc9c1
--- /dev/null
+++ b/iocore/net/I_SessionAccept.h
@@ -0,0 +1,49 @@
+/** @file
+
+  SessionAccept
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
+
+#ifndef I_SessionAccept_H_
+#define I_SessionAccept_H_
+
+#include "I_Net.h"
+#include "I_VConnection.h"
+
+class SessionAccept: public Continuation
+{
+public:
+  SessionAccept(ProxyMutex *amutex);
+  ~SessionAccept();
+
+  //
+  // Virtual function allows creation of an SSLNetAccept
+  // or NetAccept transparent to NetProcessor.
+  //
+  // This function should return a pointer
+  // of NetAccept or its subclass.
+  //
+  virtual void *createNetAccept();
+
+private:
+  virtual int mainEvent(int event, void * netvc) = 0;
+};
+
+#endif /* I_SessionAccept_H_ */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/iocore/net/Makefile.am
----------------------------------------------------------------------
diff --git a/iocore/net/Makefile.am b/iocore/net/Makefile.am
index efbfa86..4657620 100644
--- a/iocore/net/Makefile.am
+++ b/iocore/net/Makefile.am
@@ -52,8 +52,8 @@ libinknet_a_SOURCES = \
   I_UDPNet.h \
   I_UDPPacket.h \
   Inline.cc \
-  I_AcceptCont.h \
-  AcceptCont.cc \
+  I_SessionAccept.h \
+  SessionAccept.cc \
   Net.cc \
   NetVConnection.cc \
   P_CompletionUtil.h \

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/iocore/net/P_ProtocolAcceptCont.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_ProtocolAcceptCont.h b/iocore/net/P_ProtocolAcceptCont.h
index 8b25cd8..4400ea1 100644
--- a/iocore/net/P_ProtocolAcceptCont.h
+++ b/iocore/net/P_ProtocolAcceptCont.h
@@ -24,12 +24,12 @@
 #ifndef P_ProtocolAcceptCont_H_
 #define P_ProtocolAcceptCont_H_
 
-#include "I_AcceptCont.h"
+#include "I_SessionAccept.h"
 
-class ProtocolAcceptCont: public AcceptCont
+class ProtocolAcceptCont: public SessionAccept
 {
 public:
-  ProtocolAcceptCont(): AcceptCont(NULL)
+  ProtocolAcceptCont(): SessionAccept(NULL)
   {
     memset(endpoint, 0, sizeof(endpoint));
     SET_HANDLER(&ProtocolAcceptCont::mainEvent);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/iocore/net/P_SSLNextProtocolAccept.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_SSLNextProtocolAccept.h b/iocore/net/P_SSLNextProtocolAccept.h
index 342485a..1e0a96d 100644
--- a/iocore/net/P_SSLNextProtocolAccept.h
+++ b/iocore/net/P_SSLNextProtocolAccept.h
@@ -31,7 +31,7 @@
 #include "P_SSLNextProtocolSet.h"
 #include "I_IOBuffer.h"
 
-class SSLNextProtocolAccept: public AcceptCont
+class SSLNextProtocolAccept: public SessionAccept
 {
 public:
   SSLNextProtocolAccept(Continuation *);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/iocore/net/SSLNextProtocolAccept.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNextProtocolAccept.cc b/iocore/net/SSLNextProtocolAccept.cc
index 746995b..31c8cd4 100644
--- a/iocore/net/SSLNextProtocolAccept.cc
+++ b/iocore/net/SSLNextProtocolAccept.cc
@@ -147,7 +147,7 @@ SSLNextProtocolAccept::unregisterEndpoint(
 }
 
 SSLNextProtocolAccept::SSLNextProtocolAccept(Continuation * ep)
-    : AcceptCont(NULL), buffer(new_empty_MIOBuffer()), endpoint(ep)
+    : SessionAccept(NULL), buffer(new_empty_MIOBuffer()), endpoint(ep)
 {
   SET_HANDLER(&SSLNextProtocolAccept::mainEvent);
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/iocore/net/SessionAccept.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SessionAccept.cc b/iocore/net/SessionAccept.cc
new file mode 100644
index 0000000..351ffff
--- /dev/null
+++ b/iocore/net/SessionAccept.cc
@@ -0,0 +1,41 @@
+/** @file
+
+  SessionAccept
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
+
+#include "I_SessionAccept.h"
+#include "P_Net.h"
+
+SessionAccept::SessionAccept(ProxyMutex *amutex)
+    : Continuation(amutex)
+{
+  SET_HANDLER(&SessionAccept::mainEvent);
+}
+
+SessionAccept::~SessionAccept()
+{
+}
+
+void *
+SessionAccept::createNetAccept()
+{
+    return (NEW(new NetAccept));
+}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/iocore/net/UnixNetProcessor.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetProcessor.cc b/iocore/net/UnixNetProcessor.cc
index ce59bbe..825db85 100644
--- a/iocore/net/UnixNetProcessor.cc
+++ b/iocore/net/UnixNetProcessor.cc
@@ -86,7 +86,7 @@ Action *
 UnixNetProcessor::accept_internal(Continuation *cont, int fd, AcceptOptions const& opt)
 {
   EventType upgraded_etype = opt.etype; // setEtype requires non-const ref.
-  AcceptCont *acceptCont = static_cast<AcceptCont *>(cont);
+  SessionAccept *acceptCont = static_cast<SessionAccept *>(cont);
   EThread *thread = this_ethread();
   ProxyMutex *mutex = thread->mutex;
   int accept_threads = opt.accept_threads; // might be changed.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/proxy/http/HttpAcceptCont.h
----------------------------------------------------------------------
diff --git a/proxy/http/HttpAcceptCont.h b/proxy/http/HttpAcceptCont.h
index 5b8c437..fcaa9e5 100644
--- a/proxy/http/HttpAcceptCont.h
+++ b/proxy/http/HttpAcceptCont.h
@@ -160,7 +160,7 @@ namespace detail {
    from the top level configuration to the HTTP session.
 */
 
-class HttpAcceptCont: public AcceptCont, private detail::HttpAcceptContOptions
+class HttpAcceptCont: public SessionAccept, private detail::HttpAcceptContOptions
 {
 private:
   typedef HttpAcceptCont self; ///< Self reference type.
@@ -176,7 +176,7 @@ public:
       from the config file and a static is initialized long before that point.
   */
   HttpAcceptCont(Options const& opt = Options())
-    : AcceptCont(NULL)
+    : SessionAccept(NULL)
     , detail::HttpAcceptContOptions(opt) // copy these.
   {
     SET_HANDLER(&HttpAcceptCont::mainEvent);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/proxy/spdy/P_SpdyAcceptCont.h
----------------------------------------------------------------------
diff --git a/proxy/spdy/P_SpdyAcceptCont.h b/proxy/spdy/P_SpdyAcceptCont.h
index 88aea02..f7a00ab 100644
--- a/proxy/spdy/P_SpdyAcceptCont.h
+++ b/proxy/spdy/P_SpdyAcceptCont.h
@@ -29,7 +29,7 @@
 #include "P_UnixNet.h"
 #include "I_IOBuffer.h"
 
-class SpdyAcceptCont: public AcceptCont
+class SpdyAcceptCont: public SessionAccept
 {
 public:
   SpdyAcceptCont(Continuation *ep);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/523aa13c/proxy/spdy/SpdyAcceptCont.cc
----------------------------------------------------------------------
diff --git a/proxy/spdy/SpdyAcceptCont.cc b/proxy/spdy/SpdyAcceptCont.cc
index 95bfe03..5f1aa3c 100644
--- a/proxy/spdy/SpdyAcceptCont.cc
+++ b/proxy/spdy/SpdyAcceptCont.cc
@@ -27,7 +27,7 @@
 #endif
 
 SpdyAcceptCont::SpdyAcceptCont(Continuation *ep)
-    : AcceptCont(new_ProxyMutex()), endpoint(ep)
+    : SessionAccept(new_ProxyMutex()), endpoint(ep)
 {
 #if TS_HAS_SPDY
   spdy_config_load();