gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 85/222: http2: Expression 'stream->stream_id != - 1' is always t


From: gnunet
Subject: [gnurl] 85/222: http2: Expression 'stream->stream_id != - 1' is always true
Date: Thu, 07 Nov 2019 00:09:41 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit b259baabfeca71e46132435e5498513538515c11
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Sep 23 11:05:37 2019 +0200

    http2: Expression 'stream->stream_id != - 1' is always true
    
    PVS-Studio warning
    Fixes #4402
---
 lib/http2.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/lib/http2.c b/lib/http2.c
index 1481d1425..98ea90358 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -2140,17 +2140,14 @@ static ssize_t http2_send(struct connectdata *conn, int 
sockindex,
     return -1;
   }
 
-  if(stream->stream_id != -1) {
-    /* If whole HEADERS frame was sent off to the underlying socket,
-       the nghttp2 library calls data_source_read_callback. But only
-       it found that no data available, so it deferred the DATA
-       transmission. Which means that nghttp2_session_want_write()
-       returns 0 on http2_perform_getsock(), which results that no
-       writable socket check is performed. To workaround this, we
-       issue nghttp2_session_resume_data() here to bring back DATA
-       transmission from deferred state. */
-    nghttp2_session_resume_data(h2, stream->stream_id);
-  }
+  /* If whole HEADERS frame was sent off to the underlying socket, the nghttp2
+     library calls data_source_read_callback. But only it found that no data
+     available, so it deferred the DATA transmission. Which means that
+     nghttp2_session_want_write() returns 0 on http2_perform_getsock(), which
+     results that no writable socket check is performed. To workaround this,
+     we issue nghttp2_session_resume_data() here to bring back DATA
+     transmission from deferred state. */
+  nghttp2_session_resume_data(h2, stream->stream_id);
 
   return len;
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]