From 75b75a69ecabcdff7d967ec26e05e8ba2686a126 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Thu, 27 Aug 2015 10:19:36 +0000 Subject: [PATCH] Applied patch by normw@gknw.net for ANSI C compliance. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1698107 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http2/h2_mplx.c | 7 ++++++- modules/http2/h2_response.c | 9 ++++++++- modules/http2/h2_session.c | 6 +++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/modules/http2/h2_mplx.c b/modules/http2/h2_mplx.c index 49656abbca..c04b05e772 100644 --- a/modules/http2/h2_mplx.c +++ b/modules/http2/h2_mplx.c @@ -436,7 +436,12 @@ apr_status_t h2_mplx_in_update_windows(h2_mplx *m, } status = apr_thread_mutex_lock(m->lock); if (APR_SUCCESS == status) { - update_ctx ctx = { cb, cb_ctx, 0 }; + update_ctx ctx; + + ctx.cb = cb; + ctx.cb_ctx = cb_ctx; + ctx.streams_updated = 0; + status = APR_EAGAIN; h2_io_set_iter(m->stream_ios, update_window, &ctx); diff --git a/modules/http2/h2_response.c b/modules/http2/h2_response.c index b464472c56..502b376ef4 100644 --- a/modules/http2/h2_response.c +++ b/modules/http2/h2_response.c @@ -202,7 +202,14 @@ static h2_ngheader *make_ngheader(apr_pool_t *pool, const char *status, { size_t n; h2_ngheader *h; - nvctx_t ctx = { NULL, 1, strlen(status) + 1, 0, NULL, pool }; + nvctx_t ctx; + + ctx.nv = NULL; + ctx.nvlen = 1; + ctx.nvstrlen = strlen(status) + 1; + ctx.offset = 0; + ctx.strbuf = NULL; + ctx.pool = pool; apr_table_do(count_header, &ctx, header, NULL); diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c index b894fee5ba..5b46838d94 100644 --- a/modules/http2/h2_session.c +++ b/modules/http2/h2_session.c @@ -852,7 +852,11 @@ static int h2_session_resume_streams_with_data(h2_session *session) { AP_DEBUG_ASSERT(session); if (!h2_stream_set_is_empty(session->streams) && session->mplx && !session->aborted) { - resume_ctx ctx = { session, 0 }; + resume_ctx ctx; + + ctx.session = session; + ctx.resume_count = 0; + /* Resume all streams where we have data in the out queue and * which had been suspended before. */ h2_stream_set_iter(session->streams, resume_on_data, &ctx); -- 2.50.0