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/03/05 02:59:33 UTC

[trafficserver] branch quic-latest updated (c3af882 -> 50476f0)

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

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


    from c3af882  QUIC: Mem leaking with QUICPacketHeader
     new 9fa21b0  Don't use std::move when return
     new 50476f0  Don't use raw pointer for QUICPacketHeader

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 iocore/net/QUICNetVConnection.cc | 4 ++--
 iocore/net/quic/QUICPacket.cc    | 6 +++---
 iocore/net/quic/QUICPacket.h     | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

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

[trafficserver] 02/02: Don't use raw pointer for QUICPacketHeader

Posted by ma...@apache.org.
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

commit 50476f0ccab5bcbfff5efa56ca3a1232cbb7977a
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Mon Mar 5 11:58:56 2018 +0900

    Don't use raw pointer for QUICPacketHeader
---
 iocore/net/QUICNetVConnection.cc | 4 ++--
 iocore/net/quic/QUICPacket.cc    | 4 ++--
 iocore/net/quic/QUICPacket.h     | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index fcf57cf..7a712d7 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -362,8 +362,8 @@ QUICNetVConnection::retransmit_packet(const QUICPacket &packet)
   ink_assert(packet.type() != QUICPacketType::VERSION_NEGOTIATION && packet.type() != QUICPacketType::UNINITIALIZED);
 
   // Get payload from a header because packet.payload() is encrypted
-  uint16_t size          = packet.header()->payload_size();
-  const uint8_t *payload = packet.header()->payload();
+  uint16_t size          = packet.header().payload_size();
+  const uint8_t *payload = packet.header().payload();
 
   QUICFrameUPtr frame = QUICFrameFactory::create_null_frame();
   uint16_t cursor     = 0;
diff --git a/iocore/net/quic/QUICPacket.cc b/iocore/net/quic/QUICPacket.cc
index 62cfa17..372c24f 100644
--- a/iocore/net/quic/QUICPacket.cc
+++ b/iocore/net/quic/QUICPacket.cc
@@ -521,10 +521,10 @@ QUICPacket::packet_number() const
   return this->_header->packet_number();
 }
 
-const QUICPacketHeader *
+const QUICPacketHeader &
 QUICPacket::header() const
 {
-  return this->_header.get();
+  return *this->_header;
 }
 
 const uint8_t *
diff --git a/iocore/net/quic/QUICPacket.h b/iocore/net/quic/QUICPacket.h
index 6c367c4..6992b79 100644
--- a/iocore/net/quic/QUICPacket.h
+++ b/iocore/net/quic/QUICPacket.h
@@ -254,7 +254,7 @@ public:
   QUICConnectionId connection_id() const;
   QUICPacketNumber packet_number() const;
   QUICVersion version() const;
-  const QUICPacketHeader *header() const;
+  const QUICPacketHeader &header() const;
   const uint8_t *payload() const;
   bool is_retransmittable() const;
 

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

[trafficserver] 01/02: Don't use std::move when return

Posted by ma...@apache.org.
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

commit 9fa21b09e8f643b8b8f6cfbcdbaaef77b0db00ce
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Mon Mar 5 11:58:42 2018 +0900

    Don't use std::move when return
---
 iocore/net/quic/QUICPacket.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/net/quic/QUICPacket.cc b/iocore/net/quic/QUICPacket.cc
index a76d068..62cfa17 100644
--- a/iocore/net/quic/QUICPacket.cc
+++ b/iocore/net/quic/QUICPacket.cc
@@ -74,7 +74,7 @@ QUICPacketHeader::load(const uint8_t *buf, size_t len, QUICPacketNumber base)
     new (short_header) QUICPacketShortHeader(buf, len, base);
     header = QUICPacketHeaderUPtr(short_header, &QUICPacketHeaderDeleter::delete_short_header);
   }
-  return std::move(header);
+  return header;
 }
 
 QUICPacketHeaderUPtr

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