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/03/27 03:36:06 UTC

[trafficserver] branch 7.1.x updated: fix , remove not used array `buf` in `rcv_data_frame()`

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  942f57a   fix , remove not used  array `buf` in `rcv_data_frame()`
942f57a is described below

commit 942f57a4dbd410da974c7429f4ab80a0cbd69335
Author: byronhe <lh...@gmail.com>
AuthorDate: Thu Mar 23 03:25:57 2017 +0800

    fix , remove not used  array `buf` in `rcv_data_frame()`
    
    fix , remove not used  array `buf` in `rcv_data_frame()`
    (cherry picked from commit 9cebbab70f54abb3c8d14f6287ad8a0e59186b74)
---
 proxy/http2/Http2ConnectionState.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index 65a694a..f17ed3b 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -66,7 +66,6 @@ read_rcv_buffer(char *buf, size_t bufsize, unsigned &nbytes, const Http2Frame &f
 static Http2Error
 rcv_data_frame(Http2ConnectionState &cstate, const Http2Frame &frame)
 {
-  char buf[BUFFER_SIZE_FOR_INDEX(buffer_size_index[HTTP2_FRAME_TYPE_DATA])];
   unsigned nbytes               = 0;
   Http2StreamId id              = frame.header().streamid;
   uint8_t pad_length            = 0;
@@ -145,7 +144,7 @@ rcv_data_frame(Http2ConnectionState &cstate, const Http2Frame &frame)
   // second time through
   IOBufferReader *myreader = frame.reader()->clone();
   while (nbytes < payload_length - pad_length) {
-    size_t read_len = sizeof(buf);
+    size_t read_len = BUFFER_SIZE_FOR_INDEX(buffer_size_index[HTTP2_FRAME_TYPE_DATA]);
     if (nbytes + read_len > unpadded_length) {
       read_len -= nbytes + read_len - unpadded_length;
     }

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