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 2017/10/11 07:50:47 UTC

[trafficserver] 14/25: Implemented HQClientTransaction::get_transaction_id

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

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

commit bb79a5478548c5bff0df3bc7d189cb37e7766a08
Author: Bryan Call <bc...@apache.org>
AuthorDate: Wed Oct 4 12:06:31 2017 -0700

    Implemented HQClientTransaction::get_transaction_id
    
    (cherry picked from commit 72dc8c3a1c758cef3dec3869c889c281dc867cad)
---
 iocore/net/quic/QUICApplication.h | 10 ++++++++--
 iocore/net/quic/QUICStream.cc     |  2 +-
 iocore/net/quic/QUICStream.h      | 14 +++++++-------
 proxy/hq/HQClientTransaction.cc   |  4 +---
 4 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/iocore/net/quic/QUICApplication.h b/iocore/net/quic/QUICApplication.h
index 20059d7..8094a4e 100644
--- a/iocore/net/quic/QUICApplication.h
+++ b/iocore/net/quic/QUICApplication.h
@@ -26,9 +26,9 @@
 #include "../../eventsystem/I_EventSystem.h"
 #include "../../eventsystem/I_IOBuffer.h"
 #include "QUICTypes.h"
+#include "QUICStream.h"
 
 class QUICConnection;
-class QUICStream;
 class QUICApplication;
 
 /**
@@ -48,6 +48,12 @@ public:
   IOBufferReader *get_read_buffer_reader();
   void shutdown();
 
+  int
+  get_transaction_id() const
+  {
+    return _stream->id();
+  }
+
 private:
   QUICStream *_stream = nullptr;
 
@@ -62,7 +68,7 @@ private:
 };
 
 /**
- * @brief Abstruct QUIC Application Class
+ * @brief Abstract QUIC Application Class
  * @detail Every quic application must inherits this class
  */
 class QUICApplication : public Continuation
diff --git a/iocore/net/quic/QUICStream.cc b/iocore/net/quic/QUICStream.cc
index dd41ff3..a6fd600 100644
--- a/iocore/net/quic/QUICStream.cc
+++ b/iocore/net/quic/QUICStream.cc
@@ -65,7 +65,7 @@ QUICStream::init_flow_control_params(uint32_t recv_max_stream_data, uint32_t sen
 }
 
 QUICStreamId
-QUICStream::id()
+QUICStream::id() const
 {
   return this->_id;
 }
diff --git a/iocore/net/quic/QUICStream.h b/iocore/net/quic/QUICStream.h
index bdb78ae..a916ead 100644
--- a/iocore/net/quic/QUICStream.h
+++ b/iocore/net/quic/QUICStream.h
@@ -51,7 +51,7 @@ public:
   void init_flow_control_params(uint32_t recv_max_stream_data, uint32_t send_max_stream_data);
   int main_event_handler(int event, void *data);
 
-  QUICStreamId id();
+  QUICStreamId id() const;
   QUICOffset final_offset();
 
   // Implement VConnection interface.
@@ -91,20 +91,20 @@ private:
 
   Event *_send_tracked_event(Event *event, int send_event, VIO *vio);
 
-  bool _fin;
+  bool _fin               = false;
   QUICStreamId _id        = 0;
   QUICOffset _recv_offset = 0;
   QUICOffset _send_offset = 0;
 
-  QUICRemoteStreamFlowController *_remote_flow_controller;
-  QUICLocalStreamFlowController *_local_flow_controller;
-  uint64_t _flow_control_buffer_size = 1024;
+  QUICRemoteStreamFlowController *_remote_flow_controller = nullptr;
+  QUICLocalStreamFlowController *_local_flow_controller   = nullptr;
+  uint64_t _flow_control_buffer_size                      = 1024;
 
   VIO _read_vio;
   VIO _write_vio;
 
-  Event *_read_event;
-  Event *_write_event;
+  Event *_read_event  = nullptr;
+  Event *_write_event = nullptr;
 
   // Fragments of received STREAM frame (offset is unmatched)
   // TODO: Consider to replace with ts/RbTree.h or other data structure
diff --git a/proxy/hq/HQClientTransaction.cc b/proxy/hq/HQClientTransaction.cc
index 9f41461..8c168d5 100644
--- a/proxy/hq/HQClientTransaction.cc
+++ b/proxy/hq/HQClientTransaction.cc
@@ -279,7 +279,5 @@ HQClientTransaction::transaction_done()
 int
 HQClientTransaction::get_transaction_id() const
 {
-  // TODO: not implemented
-  ink_release_assert(false);
-  return 0;
+  return this->_stream_io->get_transaction_id();
 }

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