| 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/reliable_quic_stream.h" | 5 #include "net/quic/reliable_quic_stream.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/quic/iovector.h" | 8 #include "net/quic/iovector.h" |
| 9 #include "net/quic/quic_ack_listener_interface.h" | 9 #include "net/quic/quic_ack_listener_interface.h" |
| 10 #include "net/quic/quic_flags.h" | 10 #include "net/quic/quic_flags.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 bool flag_value = FLAGS_quic_fix_fin_accounting; | 94 bool flag_value = FLAGS_quic_fix_fin_accounting; |
| 95 if (!flag_value) { | 95 if (!flag_value) { |
| 96 if (read_side_closed_) { | 96 if (read_side_closed_) { |
| 97 DVLOG(1) << ENDPOINT << "Ignoring frame " << frame.stream_id; | 97 DVLOG(1) << ENDPOINT << "Ignoring frame " << frame.stream_id; |
| 98 // The subclass does not want to read data: blackhole the data. | 98 // The subclass does not want to read data: blackhole the data. |
| 99 return; | 99 return; |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 | 102 |
| 103 if (!FLAGS_quic_stop_checking_for_mismatch_ids && frame.stream_id != id_) { | |
| 104 session_->connection()->SendConnectionClose(QUIC_INTERNAL_ERROR); | |
| 105 return; | |
| 106 } | |
| 107 | |
| 108 if (frame.fin) { | 103 if (frame.fin) { |
| 109 fin_received_ = true; | 104 fin_received_ = true; |
| 110 if (fin_sent_) { | 105 if (fin_sent_) { |
| 111 session_->StreamDraining(id_); | 106 session_->StreamDraining(id_); |
| 112 } | 107 } |
| 113 } | 108 } |
| 114 | 109 |
| 115 if (flag_value) { | 110 if (flag_value) { |
| 116 if (read_side_closed_) { | 111 if (read_side_closed_) { |
| 117 DVLOG(1) << ENDPOINT << "Ignoring data in frame " << frame.stream_id; | 112 DVLOG(1) << ENDPOINT << "Ignoring data in frame " << frame.stream_id; |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 } | 465 } |
| 471 } | 466 } |
| 472 | 467 |
| 473 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { | 468 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { |
| 474 if (flow_controller_.UpdateSendWindowOffset(new_window)) { | 469 if (flow_controller_.UpdateSendWindowOffset(new_window)) { |
| 475 OnCanWrite(); | 470 OnCanWrite(); |
| 476 } | 471 } |
| 477 } | 472 } |
| 478 | 473 |
| 479 } // namespace net | 474 } // namespace net |
| OLD | NEW |