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

shinrich 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 6743e2c  Remove TSHttpSsnConnectionGet which seems redundant.
6743e2c is described below

commit 6743e2c4b0bcb73c752068f9957dfcbc8935690d
Author: Susan Hinrichs <shinr...@oath.com>
AuthorDate: Thu May 10 13:00:22 2018 +0000

    Remove TSHttpSsnConnectionGet which seems redundant.
---
 plugins/experimental/sslheaders/sslheaders.cc | 10 +++++-----
 proxy/InkAPI.cc                               | 18 ------------------
 proxy/api/ts/ts.h                             |  7 -------
 3 files changed, 5 insertions(+), 30 deletions(-)

diff --git a/plugins/experimental/sslheaders/sslheaders.cc 
b/plugins/experimental/sslheaders/sslheaders.cc
index e5afd4d..909b625 100644
--- a/plugins/experimental/sslheaders/sslheaders.cc
+++ b/plugins/experimental/sslheaders/sslheaders.cc
@@ -32,11 +32,11 @@ SslHdrExpandRequestHook(TSCont cont, TSEvent event, void 
*edata)
   TSHttpTxn txn;
   TSMBuffer mbuf;
   TSMLoc mhdr;
-  SSL *ssl;
 
-  txn = (TSHttpTxn)edata;
-  hdr = (const SslHdrInstance *)TSContDataGet(cont);
-  ssl = (SSL *)TSHttpSsnSSLConnectionGet(TSHttpTxnSsnGet(txn));
+  txn                 = (TSHttpTxn)edata;
+  hdr                 = (const SslHdrInstance *)TSContDataGet(cont);
+  TSVConn vconn       = TSHttpSsnClientVConnGet(TSHttpTxnSsnGet(txn));
+  TSSslConnection ssl = TSVConnSSLConnectionGet(vconn);
 
   switch (event) {
   case TS_EVENT_HTTP_READ_REQUEST_HDR:
@@ -61,7 +61,7 @@ SslHdrExpandRequestHook(TSCont cont, TSEvent event, void 
*edata)
     goto done;
   }
 
-  SslHdrExpand(ssl, hdr->expansions, mbuf, mhdr);
+  SslHdrExpand((SSL *)ssl, hdr->expansions, mbuf, mhdr);
   TSHandleMLocRelease(mbuf, TS_NULL_MLOC, mhdr);
 
 done:
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 8e6e09b..9507e67 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -5446,24 +5446,6 @@ TSHttpTxnTransformRespGet(TSHttpTxn txnp, TSMBuffer 
*bufp, TSMLoc *obj)
   return TS_ERROR;
 }
 
-void *
-TSHttpSsnSSLConnectionGet(TSHttpSsn ssnp)
-{
-  sdk_assert(sdk_sanity_check_null_ptr((void *)ssnp) == TS_SUCCESS);
-
-  ProxyClientSession *cs = reinterpret_cast<ProxyClientSession *>(ssnp);
-  if (cs == nullptr) {
-    return nullptr;
-  }
-
-  SSLNetVConnection *ssl_vc = dynamic_cast<SSLNetVConnection 
*>(cs->get_netvc());
-  if (ssl_vc == nullptr) {
-    return nullptr;
-  }
-
-  return (void *)ssl_vc->ssl;
-}
-
 sockaddr const *
 TSHttpSsnClientAddrGet(TSHttpSsn ssnp)
 {
diff --git a/proxy/api/ts/ts.h b/proxy/api/ts/ts.h
index 9ef463e..4ab8be0 100644
--- a/proxy/api/ts/ts.h
+++ b/proxy/api/ts/ts.h
@@ -1316,13 +1316,6 @@ tsapi TSReturnCode TSHttpTxnTransformRespGet(TSHttpTxn 
txnp, TSMBuffer *bufp, TS
 */
 tsapi void TSHttpTxnClientIncomingPortSet(TSHttpTxn txnp, int port);
 
-/** Get SSL object of this session.
-    Retrieves the SSL object of the SSL connection.
-
-    @return SSL object of this session
- */
-tsapi void *TSHttpSsnSSLConnectionGet(TSHttpSsn ssnp); /* returns SSL * */
-
 /** Get client address for transaction @a txnp.
     Retrieves the socket address of the remote client that has
     connected to Traffic Server for transaction @a txnp. The

-- 
To stop receiving notification emails like this one, please contact
shinr...@apache.org.

Reply via email to