return "value must be On or Off";
}
-#ifndef _MSC_VER
-#pragma GCC diagnostic ignored "-Wmissing-braces"
-#endif
+#define AP_END_CMD { NULL }
+
const command_rec h2_cmds[] = {
AP_INIT_TAKE1("H2MaxSessionStreams", h2_conf_set_max_streams, NULL,
RSRC_CONF, "maximum number of open streams per session"),
RSRC_CONF, "on to enable direct HTTP/2 mode"),
AP_INIT_TAKE1("H2SessionExtraFiles", h2_conf_set_session_extra_files, NULL,
RSRC_CONF, "number of extra file a session might keep open"),
- { NULL, NULL, NULL, 0, 0, NULL }
+ AP_END_CMD
};
static int submit_response(h2_session *session, h2_response *response)
{
+ nghttp2_data_provider provider;
int rv;
- nghttp2_data_provider provider = {
- (nghttp2_data_source) response->stream_id,
- (nghttp2_data_source_read_callback) stream_data_cb
- };
+
+ memset(&provider, 0, sizeof(provider));
+ provider.source.fd = response->stream_id;
+ provider.read_callback = stream_data_cb;
ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
"h2_stream(%ld-%d): submitting response %s",
}
h2_stream *h2_stream_set_find(h2_stream_set *sp,
- h2_stream_set_match_fn match, void *ctx)
+ h2_stream_set_match_fn *match, void *ctx)
{
h2_stream *s = NULL;
int i;
#include "h2_task.h"
#include "h2_worker.h"
-static void *execute(apr_thread_t *thread, void *wctx)
+static void* APR_THREAD_FUNC execute(apr_thread_t *thread, void *wctx)
{
h2_worker *worker = (h2_worker *)wctx;
apr_status_t status = APR_SUCCESS;