You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/01/15 00:47:39 UTC

[trafficserver] branch quic-latest updated: Cleanup QUICHandshake constructor

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

maskit pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
     new fa2c6df  Cleanup QUICHandshake constructor
fa2c6df is described below

commit fa2c6df6dbfd0c4a03e6de6eb6c55b8995d709aa
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Mon Jan 15 09:47:12 2018 +0900

    Cleanup QUICHandshake constructor
---
 iocore/net/quic/QUICHandshake.cc | 22 +++++++++++-----------
 iocore/net/quic/QUICHandshake.h  |  2 +-
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/iocore/net/quic/QUICHandshake.cc b/iocore/net/quic/QUICHandshake.cc
index d80a6f8..d0f2671 100644
--- a/iocore/net/quic/QUICHandshake.cc
+++ b/iocore/net/quic/QUICHandshake.cc
@@ -83,25 +83,25 @@ static constexpr int UDP_MAXIMUM_PAYLOAD_SIZE = 65527;
 // TODO: fix size
 static constexpr int MAX_HANDSHAKE_MSG_LEN = 65527;
 
-QUICHandshake::QUICHandshake(QUICConnection *qc, SSL_CTX *ssl_ctx) : QUICApplication(qc)
+QUICHandshake::QUICHandshake(QUICConnection *qc, SSL_CTX *ssl_ctx) : QUICHandshake(qc, ssl_ctx, {0})
+{
+}
+
+QUICHandshake::QUICHandshake(QUICConnection *qc, SSL_CTX *ssl_ctx, QUICStatelessResetToken token)
+  : QUICApplication(qc),
+    _ssl(SSL_new(ssl_ctx)),
+    _crypto(new QUICCryptoTls(this->_ssl, qc->direction())),
+    _version_negotiator(new QUICVersionNegotiator()),
+    _netvc_context(qc->direction()),
+    _reset_token(token)
 {
-  this->_ssl = SSL_new(ssl_ctx);
   SSL_set_ex_data(this->_ssl, QUIC::ssl_quic_qc_index, qc);
   SSL_set_ex_data(this->_ssl, QUIC::ssl_quic_hs_index, this);
-  this->_netvc_context      = qc->direction();
-  this->_crypto             = new QUICCryptoTls(this->_ssl, qc->direction());
-  this->_version_negotiator = new QUICVersionNegotiator();
-
   this->_crypto->initialize_key_materials(this->_client_qc->original_connection_id());
 
   SET_HANDLER(&QUICHandshake::state_initial);
 }
 
-QUICHandshake::QUICHandshake(QUICConnection *qc, SSL_CTX *ssl_ctx, QUICStatelessResetToken token) : QUICHandshake(qc, ssl_ctx)
-{
-  this->_reset_token = token;
-}
-
 QUICHandshake::~QUICHandshake()
 {
   SSL_free(this->_ssl);
diff --git a/iocore/net/quic/QUICHandshake.h b/iocore/net/quic/QUICHandshake.h
index 9c2e450..f6c3973 100644
--- a/iocore/net/quic/QUICHandshake.h
+++ b/iocore/net/quic/QUICHandshake.h
@@ -106,6 +106,6 @@ private:
   int _complete_handshake();
   void _abort_handshake(QUICTransErrorCode code);
 
-  QUICStatelessResetToken _reset_token;
   NetVConnectionContext_t _netvc_context = NET_VCONNECTION_UNSET;
+  QUICStatelessResetToken _reset_token;
 };

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].