Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(507)

Unified Diff: net/tools/quic/quic_packet_reader.cc

Issue 1541263002: Landing Recent QUIC changes until 12/18/2015 13:57 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: replace -1 with 0xff for InvalidPathId Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/quic_packet_reader.h ('k') | net/tools/quic/quic_server_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_packet_reader.cc
diff --git a/net/tools/quic/quic_packet_reader.cc b/net/tools/quic/quic_packet_reader.cc
index a8948c741c5919b3d6dad76db5f53362eee4e3a6..21cffdcdf1f64ae4945a3d2851d9350564f9d7a0 100644
--- a/net/tools/quic/quic_packet_reader.cc
+++ b/net/tools/quic/quic_packet_reader.cc
@@ -40,8 +40,8 @@ void QuicPacketReader::Initialize() {
memset(mmsg_hdr_, 0, sizeof(mmsg_hdr_));
for (int i = 0; i < kNumPacketsPerReadMmsgCall; ++i) {
- iov_[i].iov_base = buf_ + (2 * kMaxPacketSize * i);
- iov_[i].iov_len = 2 * kMaxPacketSize;
+ iov_[i].iov_base = buf_ + (kMaxPacketSize * i);
+ iov_[i].iov_len = kMaxPacketSize;
msghdr* hdr = &mmsg_hdr_[i].msg_hdr;
hdr->msg_name = &raw_address_[i];
@@ -64,7 +64,7 @@ bool QuicPacketReader::ReadAndDispatchPackets(
#if MMSG_MORE
// Re-set the length fields in case recvmmsg has changed them.
for (int i = 0; i < kNumPacketsPerReadMmsgCall; ++i) {
- iov_[i].iov_len = 2 * kMaxPacketSize;
+ iov_[i].iov_len = kMaxPacketSize;
mmsg_hdr_[i].msg_len = 0;
msghdr* hdr = &mmsg_hdr_[i].msg_hdr;
hdr->msg_namelen = sizeof(sockaddr_storage);
@@ -117,9 +117,7 @@ bool QuicPacketReader::ReadAndDispatchSinglePacket(
int port,
ProcessPacketInterface* processor,
QuicPacketCount* packets_dropped) {
- // Allocate some extra space so we can send an error if the packet is larger
- // than kMaxPacketSize.
- char buf[2 * kMaxPacketSize];
+ char buf[kMaxPacketSize];
IPEndPoint client_address;
IPAddressNumber server_ip;
« no previous file with comments | « net/tools/quic/quic_packet_reader.h ('k') | net/tools/quic/quic_server_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698