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


The following commit(s) were added to refs/heads/quic-latest by this push:
     new 788e27e  Add debug_msg on QUICRstStreamFrame
788e27e is described below

commit 788e27e4389261bca6a2deb4af4ac1f15aedfff9
Author: Masaori Koshiba <[email protected]>
AuthorDate: Mon Apr 1 15:35:45 2019 +0900

    Add debug_msg on QUICRstStreamFrame
---
 iocore/net/quic/QUICFrame.cc | 7 +++++++
 iocore/net/quic/QUICFrame.h  | 1 +
 2 files changed, 8 insertions(+)

diff --git a/iocore/net/quic/QUICFrame.cc b/iocore/net/quic/QUICFrame.cc
index f004623..5b11035 100644
--- a/iocore/net/quic/QUICFrame.cc
+++ b/iocore/net/quic/QUICFrame.cc
@@ -1040,6 +1040,13 @@ QUICRstStreamFrame::store(uint8_t *buf, size_t *len, 
size_t limit) const
   return *len;
 }
 
+int
+QUICRstStreamFrame::debug_msg(char *msg, size_t msg_len) const
+{
+  return snprintf(msg, msg_len, "| RESET_STREAM size=%zu stream_id=%" PRIu64 " 
code=0x%" PRIx16, this->size(), this->stream_id(),
+                  this->error_code());
+}
+
 QUICStreamId
 QUICRstStreamFrame::stream_id() const
 {
diff --git a/iocore/net/quic/QUICFrame.h b/iocore/net/quic/QUICFrame.h
index 08f77bf..e9e63ee 100644
--- a/iocore/net/quic/QUICFrame.h
+++ b/iocore/net/quic/QUICFrame.h
@@ -291,6 +291,7 @@ public:
   virtual QUICFrameType type() const override;
   virtual size_t size() const override;
   virtual size_t store(uint8_t *buf, size_t *len, size_t limit) const override;
+  virtual int debug_msg(char *msg, size_t msg_len) const override;
   virtual void parse(const uint8_t *buf, size_t len) override;
 
   QUICStreamId stream_id() const;

Reply via email to