trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudhe...@apache.org
Subject [1/2] trafficserver git commit: [TS-3184]: spdy window_update not triggered correctly
Date Tue, 11 Nov 2014 00:08:04 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master f1a144df2 -> 358cee17b


[TS-3184]: spdy window_update not triggered correctly


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/60bf04dd
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/60bf04dd
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/60bf04dd

Branch: refs/heads/master
Commit: 60bf04ddf9280af4dad4d267223ede29353b3a01
Parents: f1a144d
Author: Sudheer Vinukonda <sudheerv@yahoo-inc.com>
Authored: Tue Nov 11 00:06:53 2014 +0000
Committer: Sudheer Vinukonda <sudheerv@yahoo-inc.com>
Committed: Tue Nov 11 00:06:53 2014 +0000

----------------------------------------------------------------------
 proxy/spdy/SpdyCallbacks.cc | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/60bf04dd/proxy/spdy/SpdyCallbacks.cc
----------------------------------------------------------------------
diff --git a/proxy/spdy/SpdyCallbacks.cc b/proxy/spdy/SpdyCallbacks.cc
index 252f9a2..470ed71 100644
--- a/proxy/spdy/SpdyCallbacks.cc
+++ b/proxy/spdy/SpdyCallbacks.cc
@@ -373,6 +373,21 @@ spdy_on_data_chunk_recv_callback(spdylay_session * /*session*/, uint8_t
/*flags*
   return;
 }
 
+unsigned
+spdy_session_delta_window_size(SpdyClientSession *sm)
+{
+  unsigned sess_delta_window_size = 0;
+  map<int, SpdyRequest*>::iterator iter = sm->req_map.begin();
+  map<int, SpdyRequest*>::iterator endIter = sm->req_map.end();
+  for (; iter != endIter; ++iter) {
+    SpdyRequest* req = iter->second;
+    sess_delta_window_size += req->delta_window_size;
+  }
+  Debug("spdy", "----sm_id:%" PRId64 ", session delta_window_size:%u",
+        sess_delta_window_size);
+  return sess_delta_window_size;
+}
+
 void
 spdy_on_data_recv_callback(spdylay_session *session, uint8_t flags,
                            int32_t stream_id, int32_t length, void *user_data)
@@ -397,7 +412,7 @@ spdy_on_data_recv_callback(spdylay_session *session, uint8_t flags,
   Debug("spdy", "----sm_id:%" PRId64 ", stream_id:%d, delta_window_size:%u",
         sm->sm_id, stream_id, req->delta_window_size);
 
-  if (req->delta_window_size >= spdy_initial_window_size/2) {
+  if (spdy_session_delta_window_size(sm) >= spdy_initial_window_size/2) {
     Debug("spdy", "----Reenable write_vio for WINDOW_UPDATE frame, delta_window_size:%u",
           req->delta_window_size);
 


Mime
View raw message