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 162d6cf735e4d9e97e2f3eb3b11a96cad0978943
Author: Masaori Koshiba <masa...@apache.org>
AuthorDate: Wed Jun 20 15:05:13 2018 +0900

    Const Correctness
---
 iocore/net/quic/Mock.h                      | 2 +-
 iocore/net/quic/QUICCongestionController.cc | 2 +-
 iocore/net/quic/QUICLossDetector.cc         | 4 ++--
 iocore/net/quic/QUICLossDetector.h          | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/iocore/net/quic/Mock.h b/iocore/net/quic/Mock.h
index 949399c..898b97c 100644
--- a/iocore/net/quic/Mock.h
+++ b/iocore/net/quic/Mock.h
@@ -397,7 +397,7 @@ public:
   MockQUICCongestionController(QUICConnectionInfoProvider *info) : 
QUICCongestionController(info) {}
   // Override
   virtual void
-  on_packets_lost(std::map<QUICPacketNumber, PacketInfo *> &packets) override
+  on_packets_lost(const std::map<QUICPacketNumber, const PacketInfo *> 
&packets) override
   {
     for (auto &p : packets) {
       lost_packets.insert(p.first);
diff --git a/iocore/net/quic/QUICCongestionController.cc 
b/iocore/net/quic/QUICCongestionController.cc
index 606449c..cd01979 100644
--- a/iocore/net/quic/QUICCongestionController.cc
+++ b/iocore/net/quic/QUICCongestionController.cc
@@ -82,7 +82,7 @@ QUICCongestionController::on_packet_acked(const PacketInfo 
&acked_packet)
 }
 
 void
-QUICCongestionController::on_packets_lost(std::map<QUICPacketNumber, 
PacketInfo *> &lost_packets)
+QUICCongestionController::on_packets_lost(const std::map<QUICPacketNumber, 
const PacketInfo *> &lost_packets)
 {
   // Remove lost packets from bytes_in_flight.
   for (auto &lost_packet : lost_packets) {
diff --git a/iocore/net/quic/QUICLossDetector.cc 
b/iocore/net/quic/QUICLossDetector.cc
index d82dbe8..bc16613 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -401,7 +401,7 @@ QUICLossDetector::_detect_lost_packets(QUICPacketNumber 
largest_acked_packet_num
   SCOPED_MUTEX_LOCK(transmitter_lock, 
this->_transmitter->get_packet_transmitter_mutex().get(), this_ethread());
   SCOPED_MUTEX_LOCK(lock, this->_loss_detection_mutex, this_ethread());
   this->_loss_time = 0;
-  std::map<QUICPacketNumber, PacketInfo *> lost_packets;
+  std::map<QUICPacketNumber, const PacketInfo *> lost_packets;
   double delay_until_lost = INFINITY;
 
   if (this->_k_using_time_loss_detection) {
@@ -468,7 +468,7 @@ QUICLossDetector::_retransmit_all_unacked_handshake_data()
   SCOPED_MUTEX_LOCK(transmitter_lock, 
this->_transmitter->get_packet_transmitter_mutex().get(), this_ethread());
   SCOPED_MUTEX_LOCK(lock, this->_loss_detection_mutex, this_ethread());
   std::set<QUICPacketNumber> retransmitted_handshake_packets;
-  std::map<QUICPacketNumber, PacketInfo *> lost_packets;
+  std::map<QUICPacketNumber, const PacketInfo *> lost_packets;
 
   for (auto &info : this->_sent_packets) {
     retransmitted_handshake_packets.insert(info.first);
diff --git a/iocore/net/quic/QUICLossDetector.h 
b/iocore/net/quic/QUICLossDetector.h
index 3b2d7a1..2f2e3c8 100644
--- a/iocore/net/quic/QUICLossDetector.h
+++ b/iocore/net/quic/QUICLossDetector.h
@@ -64,7 +64,7 @@ public:
   virtual ~QUICCongestionController() {}
   void on_packet_sent(size_t bytes_sent);
   void on_packet_acked(const PacketInfo &acked_packet);
-  virtual void on_packets_lost(std::map<QUICPacketNumber, PacketInfo *> 
&packets);
+  virtual void on_packets_lost(const std::map<QUICPacketNumber, const 
PacketInfo *> &packets);
   void on_retransmission_timeout_verified();
   bool check_credit() const;
   void reset();

Reply via email to