Rename QuicBufferedPacketStore::ShouldBufferPacket to QuicBufferedPacketStore::ShouldNotBufferPacket. The function does the opposite of what its name suggests.
Thanks Shalom for noticing it!
PiperOrigin-RevId: 337569643
Change-Id: I0b6be764ffc0191a88f5b0e932baa11511dc34ff
diff --git a/quic/core/quic_buffered_packet_store.cc b/quic/core/quic_buffered_packet_store.cc
index a90cef6..b2780c6 100644
--- a/quic/core/quic_buffered_packet_store.cc
+++ b/quic/core/quic_buffered_packet_store.cc
@@ -100,7 +100,7 @@
const bool is_first_packet =
!QuicContainsKey(undecryptable_packets_, connection_id);
if (is_first_packet) {
- if (ShouldBufferPacket(is_chlo)) {
+ if (ShouldNotBufferPacket(is_chlo)) {
// Drop the packet if the upper limit of undecryptable packets has been
// reached or the whole capacity of the store has been reached.
return TOO_MANY_CONNECTIONS;
@@ -217,7 +217,7 @@
}
}
-bool QuicBufferedPacketStore::ShouldBufferPacket(bool is_chlo) {
+bool QuicBufferedPacketStore::ShouldNotBufferPacket(bool is_chlo) {
bool is_store_full =
undecryptable_packets_.size() >= kDefaultMaxConnectionsInStore;
diff --git a/quic/core/quic_buffered_packet_store.h b/quic/core/quic_buffered_packet_store.h
index b862b42..615e91e 100644
--- a/quic/core/quic_buffered_packet_store.h
+++ b/quic/core/quic_buffered_packet_store.h
@@ -166,7 +166,7 @@
// Return true if add an extra packet will go beyond allowed max connection
// limit. The limit for non-CHLO packet and CHLO packet is different.
- bool ShouldBufferPacket(bool is_chlo);
+ bool ShouldNotBufferPacket(bool is_chlo);
// A map to store packet queues with creation time for each connection.
BufferedPacketMap undecryptable_packets_;