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/04/13 06:58:32 UTC

[trafficserver] 01/03: Rename QUICConnection in QUICApplication

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

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

commit e1e5e86f896bae893a6507dc5f1df61d8e37e8b3
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Fri Apr 13 15:39:40 2018 +0900

    Rename QUICConnection in QUICApplication
---
 iocore/net/quic/QUICApplication.cc | 5 ++---
 iocore/net/quic/QUICApplication.h  | 2 +-
 iocore/net/quic/QUICHandshake.cc   | 8 ++++----
 proxy/hq/QUICSimpleApp.cc          | 6 +++---
 4 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/iocore/net/quic/QUICApplication.cc b/iocore/net/quic/QUICApplication.cc
index c15dd93..4283819 100644
--- a/iocore/net/quic/QUICApplication.cc
+++ b/iocore/net/quic/QUICApplication.cc
@@ -133,7 +133,7 @@ QUICStreamIO::get_transaction_id() const
 //
 QUICApplication::QUICApplication(QUICConnection *qc) : Continuation(new_ProxyMutex())
 {
-  this->_client_qc = qc;
+  this->_qc = qc;
 }
 
 // @brief Bind stream and application
@@ -162,8 +162,7 @@ QUICApplication::reenable(QUICStream *stream)
     stream_io->read_reenable();
     stream_io->write_reenable();
   } else {
-    Debug(tag, "[%" PRIx64 "] Unknown Stream, id: %" PRIx64, static_cast<uint64_t>(this->_client_qc->connection_id()),
-          stream->id());
+    Debug(tag, "[%" PRIx64 "] Unknown Stream, id: %" PRIx64, static_cast<uint64_t>(this->_qc->connection_id()), stream->id());
   }
 
   return;
diff --git a/iocore/net/quic/QUICApplication.h b/iocore/net/quic/QUICApplication.h
index d1f94de..eef90a0 100644
--- a/iocore/net/quic/QUICApplication.h
+++ b/iocore/net/quic/QUICApplication.h
@@ -86,7 +86,7 @@ protected:
   QUICStreamIO *_find_stream_io(QUICStreamId id);
   QUICStreamIO *_find_stream_io(VIO *vio);
 
-  QUICConnection *_client_qc = nullptr;
+  QUICConnection *_qc = nullptr;
 
 private:
   std::map<QUICStreamId, QUICStreamIO *> _stream_map;
diff --git a/iocore/net/quic/QUICHandshake.cc b/iocore/net/quic/QUICHandshake.cc
index 37ec334..831da56 100644
--- a/iocore/net/quic/QUICHandshake.cc
+++ b/iocore/net/quic/QUICHandshake.cc
@@ -37,7 +37,7 @@
 static constexpr char dump_tag[] = "v_quic_handshake_dump_pkt";
 
 #define QUICHSDebug(fmt, ...) \
-  Debug("quic_handshake", "[%" PRIx64 "] " fmt, static_cast<uint64_t>(this->_client_qc->connection_id()), ##__VA_ARGS__)
+  Debug("quic_handshake", "[%" PRIx64 "] " fmt, static_cast<uint64_t>(this->_qc->connection_id()), ##__VA_ARGS__)
 
 #define I_WANNA_DUMP_THIS_BUF(buf, len)                                                                                            \
   {                                                                                                                                \
@@ -101,7 +101,7 @@ QUICHandshake::QUICHandshake(QUICConnection *qc, SSL_CTX *ssl_ctx, QUICStateless
 {
   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->_hs_protocol->initialize_key_materials(this->_client_qc->original_connection_id());
+  this->_hs_protocol->initialize_key_materials(this->_qc->original_connection_id());
 
   if (this->_netvc_context == NET_VCONNECTION_OUT) {
     this->_initial = true;
@@ -143,7 +143,7 @@ QUICHandshake::start(const QUICPacket *initial_packet, QUICPacketFactory *packet
         this->_load_local_server_transport_parameters(initial_packet->version());
         packet_factory->set_version(this->_version_negotiator->negotiated_version());
       } else {
-        this->_client_qc->transmit_packet(packet_factory->create_version_negotiation_packet(initial_packet));
+        this->_qc->transmit_packet(packet_factory->create_version_negotiation_packet(initial_packet));
         QUICHSDebug("Version negotiation failed: %x", initial_packet->version());
       }
     } else {
@@ -525,7 +525,7 @@ QUICHandshake::_complete_handshake()
 void
 QUICHandshake::_abort_handshake(QUICTransErrorCode code)
 {
-  this->_client_qc->close(QUICConnectionErrorUPtr(new QUICConnectionError(code)));
+  this->_qc->close(QUICConnectionErrorUPtr(new QUICConnectionError(code)));
 
   QUICHSDebug("Enter state_closed");
   SET_HANDLER(&QUICHandshake::state_closed);
diff --git a/proxy/hq/QUICSimpleApp.cc b/proxy/hq/QUICSimpleApp.cc
index 36fd7d7..b06821d 100644
--- a/proxy/hq/QUICSimpleApp.cc
+++ b/proxy/hq/QUICSimpleApp.cc
@@ -42,7 +42,7 @@ QUICSimpleApp::QUICSimpleApp(QUICNetVConnection *client_vc) : QUICApplication(cl
   this->_client_session->acl_record = session_acl_record;
   this->_client_session->new_connection(client_vc, nullptr, nullptr, false);
 
-  this->_client_qc->stream_manager()->set_default_application(this);
+  this->_qc->stream_manager()->set_default_application(this);
 
   SET_HANDLER(&QUICSimpleApp::main_event_handler);
 }
@@ -55,13 +55,13 @@ QUICSimpleApp::~QUICSimpleApp()
 int
 QUICSimpleApp::main_event_handler(int event, Event *data)
 {
-  Debug(tag, "[%" PRIx64 "] %s (%d)", static_cast<uint64_t>(this->_client_qc->connection_id()), get_vc_event_name(event), event);
+  Debug(tag, "[%" PRIx64 "] %s (%d)", static_cast<uint64_t>(this->_qc->connection_id()), get_vc_event_name(event), event);
 
   VIO *vio                = reinterpret_cast<VIO *>(data);
   QUICStreamIO *stream_io = this->_find_stream_io(vio);
 
   if (stream_io == nullptr) {
-    Debug(tag, "[%" PRIx64 "] Unknown Stream", static_cast<uint64_t>(this->_client_qc->connection_id()));
+    Debug(tag, "[%" PRIx64 "] Unknown Stream", static_cast<uint64_t>(this->_qc->connection_id()));
     return -1;
   }
 

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