From: Stefan Eissing Date: Tue, 1 Oct 2024 10:36:42 +0000 (+0000) Subject: *) mod_http2: X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4c6d51cbacda457160fd97abf88c37e7189df759;p=thirdparty%2Fapache%2Fhttpd.git *) mod_http2: 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 --- diff --git a/modules/http2/h2_mplx.c b/modules/http2/h2_mplx.c index 71a743177f2..39e9b1b001a 100644 --- a/modules/http2/h2_mplx.c +++ b/modules/http2/h2_mplx.c @@ -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);