You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by su...@apache.org on 2015/06/17 20:35:52 UTC

[2/2] trafficserver git commit: [TS-3153]: Add SessionAccept object pointer to SSLNetVC.

[TS-3153]: Add SessionAccept object pointer  to SSLNetVC.


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

Branch: refs/heads/master
Commit: 52e3a68cffdbda03c748cbdee9f3b93e8c4d4529
Parents: a655af5
Author: Sudheer Vinukonda <su...@yahoo-inc.com>
Authored: Wed Jun 17 18:34:17 2015 +0000
Committer: Sudheer Vinukonda <su...@yahoo-inc.com>
Committed: Wed Jun 17 18:35:43 2015 +0000

----------------------------------------------------------------------
 iocore/net/P_SSLNetVConnection.h    | 13 +++++++++++++
 iocore/net/SSLNetVConnection.cc     |  3 ++-
 iocore/net/SSLNextProtocolAccept.cc |  1 +
 3 files changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/52e3a68c/iocore/net/P_SSLNetVConnection.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_SSLNetVConnection.h b/iocore/net/P_SSLNetVConnection.h
index 2d7f5de..d4b79e9 100644
--- a/iocore/net/P_SSLNetVConnection.h
+++ b/iocore/net/P_SSLNetVConnection.h
@@ -162,6 +162,18 @@ public:
     transparentPassThrough = val;
   };
 
+  void
+  set_session_accept_pointer(SessionAccept *acceptPtr)
+  {
+    sessionAcceptPtr = acceptPtr;
+  };
+
+  SessionAccept *
+  get_session_accept_pointer(void) const
+  {
+    return sessionAcceptPtr;
+  };
+
   // Copy up here so we overload but don't override
   using super::reenable;
 
@@ -243,6 +255,7 @@ private:
 
   const SSLNextProtocolSet *npnSet;
   Continuation *npnEndpoint;
+  SessionAccept *sessionAcceptPtr;
 };
 
 typedef int (SSLNetVConnection::*SSLNetVConnHandler)(int, void *);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/52e3a68c/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 0d9c2a9..1cfb48b 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -755,7 +755,7 @@ SSLNetVConnection::SSLNetVConnection()
   : ssl(NULL), sslHandshakeBeginTime(0), sslLastWriteTime(0), sslTotalBytesSent(0), hookOpRequested(TS_SSL_HOOK_OP_DEFAULT),
     sslHandShakeComplete(false), sslClientConnection(false), sslClientRenegotiationAbort(false), handShakeBuffer(NULL),
     handShakeHolder(NULL), handShakeReader(NULL), handShakeBioStored(0), sslPreAcceptHookState(SSL_HOOKS_INIT),
-    sslHandshakeHookState(HANDSHAKE_HOOKS_PRE), npnSet(NULL), npnEndpoint(NULL)
+    sslHandshakeHookState(HANDSHAKE_HOOKS_PRE), npnSet(NULL), npnEndpoint(NULL), sessionAcceptPtr(NULL)
 {
 }
 
@@ -826,6 +826,7 @@ SSLNetVConnection::free(EThread *t)
   hookOpRequested = TS_SSL_HOOK_OP_DEFAULT;
   npnSet = NULL;
   npnEndpoint = NULL;
+  sessionAcceptPtr = NULL;
   free_handshake_buffers();
 
   if (from_accept_thread) {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/52e3a68c/iocore/net/SSLNextProtocolAccept.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNextProtocolAccept.cc b/iocore/net/SSLNextProtocolAccept.cc
index ad347f2..8ea5001 100644
--- a/iocore/net/SSLNextProtocolAccept.cc
+++ b/iocore/net/SSLNextProtocolAccept.cc
@@ -132,6 +132,7 @@ SSLNextProtocolAccept::mainEvent(int event, void *edata)
     // and we know which protocol was negotiated.
     netvc->registerNextProtocolSet(&this->protoset);
     netvc->do_io(VIO::READ, new SSLNextProtocolTrampoline(this, netvc->mutex), 0, this->buffer, 0);
+    netvc->set_session_accept_pointer(this);
     return EVENT_CONT;
   default:
     netvc->do_io(VIO::CLOSE);