Index: trunk/src/net/quic/quic_session.cc |
=================================================================== |
--- trunk/src/net/quic/quic_session.cc (revision 204061) |
+++ trunk/src/net/quic/quic_session.cc (working copy) |
@@ -14,8 +14,6 @@ |
namespace net { |
-#define ENDPOINT (is_server_ ? "Server: " : " Client: ") |
- |
// We want to make sure we delete any closed streams in a safe manner. |
// To avoid deleting a stream in mid-operation, we have a simple shim between |
// us and the stream, so we can delete any streams when we return from |
@@ -76,7 +74,6 @@ |
next_stream_id_(is_server ? 2 : 3), |
is_server_(is_server), |
largest_peer_created_stream_id_(0), |
- error_(QUIC_NO_ERROR), |
goaway_received_(false), |
goaway_sent_(false) { |
set_max_open_streams(config_.max_streams_per_connection()); |
@@ -98,7 +95,7 @@ |
const QuicPacketHeader& header, |
const vector<QuicStreamFrame>& frames) { |
if (header.public_header.guid != connection()->guid()) { |
- DLOG(INFO) << ENDPOINT << "Got packet header for invalid GUID: " |
+ DLOG(INFO) << "Got packet header for invalid GUID: " |
<< header.public_header.guid; |
return false; |
} |
@@ -152,17 +149,13 @@ |
} |
void QuicSession::ConnectionClose(QuicErrorCode error, bool from_peer) { |
- if (error_ == QUIC_NO_ERROR) { |
- error_ = error; |
- } |
- |
while (stream_map_.size() != 0) { |
ReliableStreamMap::iterator it = stream_map_.begin(); |
QuicStreamId id = it->first; |
it->second->ConnectionClose(error, from_peer); |
// The stream should call CloseStream as part of ConnectionClose. |
if (stream_map_.find(id) != stream_map_.end()) { |
- LOG(DFATAL) << ENDPOINT << "Stream failed to close under ConnectionClose"; |
+ LOG(DFATAL) << "Stream failed to close under ConnectionClose"; |
CloseStream(id); |
} |
} |
@@ -208,11 +201,11 @@ |
} |
void QuicSession::CloseStream(QuicStreamId stream_id) { |
- DLOG(INFO) << ENDPOINT << "Closing stream " << stream_id; |
+ DLOG(INFO) << "Closing stream " << stream_id; |
ReliableStreamMap::iterator it = stream_map_.find(stream_id); |
if (it == stream_map_.end()) { |
- DLOG(INFO) << ENDPOINT << "Stream is already closed: " << stream_id; |
+ DLOG(INFO) << "Stream is already closed: " << stream_id; |
return; |
} |
ReliableQuicStream* stream = it->second; |
@@ -244,7 +237,7 @@ |
break; |
case HANDSHAKE_CONFIRMED: |
- LOG_IF(DFATAL, !config_.negotiated()) << ENDPOINT |
+ LOG_IF(DFATAL, !config_.negotiated()) |
<< "Handshake confirmed without parameter negotiation."; |
connection_->SetIdleNetworkTimeout( |
config_.idle_connection_state_lifetime()); |
@@ -253,7 +246,7 @@ |
break; |
default: |
- LOG(ERROR) << ENDPOINT << "Got unknown handshake event: " << event; |
+ LOG(ERROR) << "Got unknown handshake event: " << event; |
} |
} |
@@ -262,8 +255,8 @@ |
} |
void QuicSession::ActivateStream(ReliableQuicStream* stream) { |
- DLOG(INFO) << ENDPOINT << "num_streams: " << stream_map_.size() |
- << ". activating " << stream->id(); |
+ DLOG(INFO) << "num_streams: " << stream_map_.size() |
+ << ". activating " << stream->id(); |
DCHECK(stream_map_.count(stream->id()) == 0); |
stream_map_[stream->id()] = stream; |
} |