]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
*) mod_http2:
authorStefan Eissing <icing@apache.org>
Tue, 1 Oct 2024 10:36:42 +0000 (10:36 +0000)
committerStefan Eissing <icing@apache.org>
Tue, 1 Oct 2024 10:36:42 +0000 (10:36 +0000)
     h2_mplx: fix debug check when stream was not found

     A "this should never happen" check logic was wrong when looking
     *why* a stream that SHOULD be there was not. The loop did not
     properly match streams in "purge" state.

     The log warning issued has never been reported, so this code
     seems to never actually do anything. Still fix the logic to
     do what it is intended to.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921066 13f79535-47bb-0310-9956-ffa450edef68

modules/http2/h2_mplx.c

index 71a743177f206d6f6fe7204fede6e03d2fa9cd15..39e9b1b001aebea3df995d752ae344870188578a 100644 (file)
@@ -1018,7 +1018,8 @@ static void s_c2_done(h2_mplx *m, conn_rec *c2, h2_conn_ctx_t *conn_ctx)
         int i;
 
         for (i = 0; i < m->spurge->nelts; ++i) {
-            if (stream == APR_ARRAY_IDX(m->spurge, i, h2_stream*)) {
+            stream = APR_ARRAY_IDX(m->spurge, i, h2_stream*);
+            if (stream && (stream->id == conn_ctx->stream_id)) {
                 ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, c2,
                               H2_STRM_LOG(APLOGNO(03517), stream, "already in spurge"));
                 ap_assert("stream should not be in spurge" == NULL);