OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/quic_connection.h" | 5 #include "net/quic/quic_connection.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 #include <sys/types.h> | 8 #include <sys/types.h> |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <iterator> | 10 #include <iterator> |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 | 382 |
383 bool QuicConnection::OnUnauthenticatedHeader(const QuicPacketHeader& header) { | 383 bool QuicConnection::OnUnauthenticatedHeader(const QuicPacketHeader& header) { |
384 return true; | 384 return true; |
385 } | 385 } |
386 | 386 |
387 bool QuicConnection::OnPacketHeader(const QuicPacketHeader& header) { | 387 bool QuicConnection::OnPacketHeader(const QuicPacketHeader& header) { |
388 if (debug_visitor_) { | 388 if (debug_visitor_) { |
389 debug_visitor_->OnPacketHeader(header); | 389 debug_visitor_->OnPacketHeader(header); |
390 } | 390 } |
391 | 391 |
392 if (header.fec_flag && framer_.version() <= QUIC_VERSION_14) { | 392 if (header.fec_flag && framer_.version() == QUIC_VERSION_13) { |
393 DLOG(WARNING) << "Ignoring FEC packets for versions prior to 15."; | |
394 return false; | 393 return false; |
395 } | 394 } |
396 | 395 |
397 if (!ProcessValidatedPacket()) { | 396 if (!ProcessValidatedPacket()) { |
398 return false; | 397 return false; |
399 } | 398 } |
400 | 399 |
401 // Will be decrement below if we fall through to return true; | 400 // Will be decrement below if we fall through to return true; |
402 ++stats_.packets_dropped; | 401 ++stats_.packets_dropped; |
403 | 402 |
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1807 // If we changed the generator's batch state, restore original batch state. | 1806 // If we changed the generator's batch state, restore original batch state. |
1808 if (!already_in_batch_mode_) { | 1807 if (!already_in_batch_mode_) { |
1809 DVLOG(1) << "Leaving Batch Mode."; | 1808 DVLOG(1) << "Leaving Batch Mode."; |
1810 connection_->packet_generator_.FinishBatchOperations(); | 1809 connection_->packet_generator_.FinishBatchOperations(); |
1811 } | 1810 } |
1812 DCHECK_EQ(already_in_batch_mode_, | 1811 DCHECK_EQ(already_in_batch_mode_, |
1813 connection_->packet_generator_.InBatchMode()); | 1812 connection_->packet_generator_.InBatchMode()); |
1814 } | 1813 } |
1815 | 1814 |
1816 } // namespace net | 1815 } // namespace net |
OLD | NEW |