You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/07/28 02:11:33 UTC

[trafficserver] branch 7.1.x updated: For 7.1.x, H2 Assertsion at Http2DependencyTree::deactivate

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/7.1.x by this push:
     new 89b7da1  For 7.1.x, H2 Assertsion at Http2DependencyTree::deactivate
89b7da1 is described below

commit 89b7da1d62d40f36e3e84830c10371f75e308237
Author: scw00 <sc...@apache.org>
AuthorDate: Fri Jul 28 08:33:59 2017 +0800

    For 7.1.x, H2 Assertsion at Http2DependencyTree::deactivate
---
 proxy/http2/Http2ConnectionState.cc | 10 +++++-----
 proxy/http2/Http2ConnectionState.h  |  2 +-
 proxy/http2/Http2DependencyTree.h   |  2 --
 proxy/http2/Http2Stream.h           |  2 --
 4 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index 12e449e..0836db8 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -1004,7 +1004,7 @@ Http2ConnectionState::create_stream(Http2StreamId new_id, Http2Error &error)
   ink_assert(nullptr != new_stream);
   ink_assert(!stream_list.in(new_stream));
 
-  stream_list.push(new_stream);
+  stream_list.enqueue(new_stream);
   if (client_streamid) {
     latest_streamid_in = new_id;
     ink_assert(client_streams_in_count < UINT32_MAX);
@@ -1030,7 +1030,7 @@ Http2ConnectionState::create_stream(Http2StreamId new_id, Http2Error &error)
 Http2Stream *
 Http2ConnectionState::find_stream(Http2StreamId id) const
 {
-  for (Http2Stream *s = stream_list.head; s; s = s->link.next) {
+  for (Http2Stream *s = stream_list.head; s; s = static_cast<Http2Stream *>(s->link.next)) {
     if (s->get_id() == id) {
       return s;
     }
@@ -1045,7 +1045,7 @@ Http2ConnectionState::restart_streams()
   Http2Stream *s = stream_list.head;
 
   while (s) {
-    Http2Stream *next = s->link.next;
+    Http2Stream *next = static_cast<Http2Stream *>(s->link.next);
     if (!s->is_closed() && s->get_state() == Http2StreamState::HTTP2_STREAM_STATE_HALF_CLOSED_REMOTE &&
         min(this->client_rwnd, s->client_rwnd) > 0) {
       s->send_response_body();
@@ -1060,7 +1060,7 @@ Http2ConnectionState::cleanup_streams()
 {
   Http2Stream *s = stream_list.head;
   while (s) {
-    Http2Stream *next = s->link.next;
+    Http2Stream *next = static_cast<Http2Stream *>(s->link.next);
     this->delete_stream(s);
     ink_assert(s != next);
     s = next;
@@ -1149,7 +1149,7 @@ void
 Http2ConnectionState::update_initial_rwnd(Http2WindowSize new_size)
 {
   // Update stream level window sizes
-  for (Http2Stream *s = stream_list.head; s; s = s->link.next) {
+  for (Http2Stream *s = stream_list.head; s; s = static_cast<Http2Stream *>(s->link.next)) {
     s->client_rwnd = new_size - (client_settings.get(HTTP2_SETTINGS_INITIAL_WINDOW_SIZE) - s->client_rwnd);
   }
 }
diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index 17e45a5..53c76a0 100644
--- a/proxy/http2/Http2ConnectionState.h
+++ b/proxy/http2/Http2ConnectionState.h
@@ -277,7 +277,7 @@ private:
   //   is CLOSED.
   //   If given Stream Identifier is not found in stream_list and it is greater
   //   than latest_streamid_in, the state of Stream is IDLE.
-  DLL<Http2Stream> stream_list;
+  Queue<Http2Stream> stream_list;
   Http2StreamId latest_streamid_in;
   Http2StreamId latest_streamid_out;
   int stream_requests;
diff --git a/proxy/http2/Http2DependencyTree.h b/proxy/http2/Http2DependencyTree.h
index 8a16c13..007603b 100644
--- a/proxy/http2/Http2DependencyTree.h
+++ b/proxy/http2/Http2DependencyTree.h
@@ -316,8 +316,6 @@ Http2DependencyTree<T>::deactivate(Node *node, uint32_t sent)
   node->active = false;
 
   while (node->queue->empty() && node->parent != NULL) {
-    ink_assert(node->parent->queue->top() == node->entry);
-
     node->parent->queue->pop();
     node->queued = false;
 
diff --git a/proxy/http2/Http2Stream.h b/proxy/http2/Http2Stream.h
index 6c36ca2..9387976 100644
--- a/proxy/http2/Http2Stream.h
+++ b/proxy/http2/Http2Stream.h
@@ -179,8 +179,6 @@ public:
   // Stream level window size
   ssize_t client_rwnd, server_rwnd;
 
-  LINK(Http2Stream, link);
-
   uint8_t *header_blocks;
   uint32_t header_blocks_length;  // total length of header blocks (not include
                                   // Padding or other fields)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].