gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 107/153: http2: avoid set_stream_user_data() before


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 107/153: http2: avoid set_stream_user_data() before stream is assigned
Date: Tue, 11 Sep 2018 12:52:58 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit e29ff2be2f4ae0dace025672e0289104d58adb2a
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Aug 20 13:19:08 2018 +0200

    http2: avoid set_stream_user_data() before stream is assigned
    
    ... before the stream is started, we have it set to -1.
    
    Fixes #2894
    Closes #2898
---
 lib/http2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/http2.c b/lib/http2.c
index 9380ca7cf..350642019 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -1178,7 +1178,8 @@ void Curl_http2_done(struct connectdata *conn, bool 
premature)
       httpc->pause_stream_id = 0;
     }
   }
-  if(http->stream_id) {
+  /* -1 means unassigned and 0 means cleared */
+  if(http->stream_id > 0) {
     int rv = nghttp2_session_set_stream_user_data(httpc->h2,
                                                   http->stream_id, 0);
     if(rv) {

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



reply via email to

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