You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2016/04/16 22:10:37 UTC
[trafficserver] branch master updated: Fix clang-analyzer issues.
This is an automated email from the ASF dual-hosted git repository.
shinrich pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new cc4fb35 Fix clang-analyzer issues.
cc4fb35 is described below
commit cc4fb35f73f8d313e247873a2e18d793d3c47e74
Author: shinrich <sh...@yahoo-inc.com>
AuthorDate: Sat Apr 16 15:10:10 2016 -0500
Fix clang-analyzer issues.
---
proxy/http/Http1ClientSession.cc | 32 +++++++++++++++++---------------
proxy/http2/Http2Stream.cc | 2 +-
2 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/proxy/http/Http1ClientSession.cc b/proxy/http/Http1ClientSession.cc
index 1175ceb..ef0527a 100644
--- a/proxy/http/Http1ClientSession.cc
+++ b/proxy/http/Http1ClientSession.cc
@@ -240,26 +240,28 @@ Http1ClientSession::do_io_close(int alerrno)
SET_HANDLER(&Http1ClientSession::state_wait_for_close);
DebugHttpSsn("[%" PRId64 "] session half close", con_id);
- // We want the client to know that that we're finished
- // writing. The write shutdown accomplishes this. Unfortuantely,
- // the IO Core semantics don't stop us from getting events
- // on the write side of the connection like timeouts so we
- // need to zero out the write of the continuation with
- // the do_io_write() call (INKqa05309)
- client_vc->do_io_shutdown(IO_SHUTDOWN_WRITE);
-
- ka_vio = client_vc->do_io_read(this, INT64_MAX, read_buffer);
- ink_assert(slave_ka_vio != ka_vio);
+ if (client_vc) {
+ // We want the client to know that that we're finished
+ // writing. The write shutdown accomplishes this. Unfortuantely,
+ // the IO Core semantics don't stop us from getting events
+ // on the write side of the connection like timeouts so we
+ // need to zero out the write of the continuation with
+ // the do_io_write() call (INKqa05309)
+ client_vc->do_io_shutdown(IO_SHUTDOWN_WRITE);
+
+ ka_vio = client_vc->do_io_read(this, INT64_MAX, read_buffer);
+ ink_assert(slave_ka_vio != ka_vio);
+
+ // Set the active timeout to the same as the inactive time so
+ // that this connection does not hang around forever if
+ // the ua hasn't closed
+ client_vc->set_active_timeout(HRTIME_SECONDS(trans.get_sm()->t_state.txn_conf->keep_alive_no_activity_timeout_out));
+ }
// [bug 2610799] Drain any data read.
// If the buffer is full and the client writes again, we will not receive a
// READ_READY event.
sm_reader->consume(sm_reader->read_avail());
-
- // Set the active timeout to the same as the inactive time so
- // that this connection does not hang around forever if
- // the ua hasn't closed
- client_vc->set_active_timeout(HRTIME_SECONDS(trans.get_sm()->t_state.txn_conf->keep_alive_no_activity_timeout_out));
} else {
read_state = HCS_CLOSED;
DebugHttpSsn("[%" PRId64 "] session closed", con_id);
diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc
index 93def8b..df35f1e 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -432,7 +432,7 @@ Http2Stream::update_write_request(IOBufferReader *buf_reader, int64_t write_len,
parent->connection_state.send_headers_frame(this);
// See if the response is chunked. Set up the dechunking logic if it is
- is_done = this->response_initialize_data_handling();
+ this->response_initialize_data_handling();
// If there is additional data, send it along in a data frame. Or if this was header only
// make sure to send the end of stream
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].