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

Side by Side Diff: net/tools/quic/quic_server_session.cc

Issue 1548783002: Adding details to most quic connection close calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110540464
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « net/tools/quic/quic_dispatcher_test.cc ('k') | net/tools/quic/quic_server_session_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/tools/quic/quic_server_session.h" 5 #include "net/tools/quic/quic_server_session.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/proto/cached_network_parameters.pb.h" 8 #include "net/quic/proto/cached_network_parameters.pb.h"
9 #include "net/quic/quic_connection.h" 9 #include "net/quic/quic_connection.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 183 }
184 184
185 bool QuicServerSession::ShouldCreateIncomingDynamicStream(QuicStreamId id) { 185 bool QuicServerSession::ShouldCreateIncomingDynamicStream(QuicStreamId id) {
186 if (!connection()->connected()) { 186 if (!connection()->connected()) {
187 LOG(DFATAL) << "ShouldCreateIncomingDynamicStream called when disconnected"; 187 LOG(DFATAL) << "ShouldCreateIncomingDynamicStream called when disconnected";
188 return false; 188 return false;
189 } 189 }
190 190
191 if (id % 2 == 0) { 191 if (id % 2 == 0) {
192 DVLOG(1) << "Invalid incoming even stream_id:" << id; 192 DVLOG(1) << "Invalid incoming even stream_id:" << id;
193 connection()->SendConnectionClose(QUIC_INVALID_STREAM_ID); 193 connection()->SendConnectionCloseWithDetails(
194 QUIC_INVALID_STREAM_ID, "Client created even numbered stream");
194 return false; 195 return false;
195 } 196 }
196 return true; 197 return true;
197 } 198 }
198 199
199 QuicSpdyStream* QuicServerSession::CreateIncomingDynamicStream( 200 QuicSpdyStream* QuicServerSession::CreateIncomingDynamicStream(
200 QuicStreamId id) { 201 QuicStreamId id) {
201 if (!ShouldCreateIncomingDynamicStream(id)) { 202 if (!ShouldCreateIncomingDynamicStream(id)) {
202 return nullptr; 203 return nullptr;
203 } 204 }
(...skipping 30 matching lines...) Expand all
234 ActivateStream(stream); 235 ActivateStream(stream);
235 return stream; 236 return stream;
236 } 237 }
237 238
238 QuicCryptoServerStreamBase* QuicServerSession::GetCryptoStream() { 239 QuicCryptoServerStreamBase* QuicServerSession::GetCryptoStream() {
239 return crypto_stream_.get(); 240 return crypto_stream_.get();
240 } 241 }
241 242
242 } // namespace tools 243 } // namespace tools
243 } // namespace net 244 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_dispatcher_test.cc ('k') | net/tools/quic/quic_server_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698