static int log_stream(void *ctx, h2_stream *stream) { h2_session *session = (h2_session *)ctx; AP_DEBUG_ASSERT(session); ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c, "h2_stream(%ld-%d): in set, suspended=%d, aborted=%d, " "has_data=%d", session->id, stream->id, stream->suspended, stream->aborted, h2_mplx_out_has_data_for(session->mplx, stream->id)); return 1; }
static h2_stream *resume_on_data(void *ctx, h2_stream *stream) { h2_session *session = (h2_session *)ctx; assert(session); assert(stream); if (h2_stream_is_suspended(stream)) { ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, stream->pool, "h2_stream(%ld-%d): suspended, checking for DATA", h2_mplx_get_id(stream->m), stream->id); if (h2_mplx_out_has_data_for(stream->m, h2_stream_get_id(stream))) { h2_stream_set_suspended(stream, 0); int rv = nghttp2_session_resume_data(session->ngh2, h2_stream_get_id(stream)); ap_log_cerror(APLOG_MARK, nghttp2_is_fatal(rv)? APLOG_ERR : APLOG_DEBUG, 0, session->c, "h2_stream(%ld-%d): resuming stream %s", session->id, stream->id, nghttp2_strerror(rv)); } } return NULL; }
static int resume_on_data(void *ctx, h2_stream *stream) { resume_ctx *rctx = (resume_ctx*)ctx; h2_session *session = rctx->session; AP_DEBUG_ASSERT(session); AP_DEBUG_ASSERT(stream); if (h2_stream_is_suspended(stream)) { if (h2_mplx_out_has_data_for(stream->m, stream->id)) { int rv; h2_stream_set_suspended(stream, 0); ++rctx->resume_count; rv = nghttp2_session_resume_data(session->ngh2, stream->id); ap_log_cerror(APLOG_MARK, nghttp2_is_fatal(rv)? APLOG_ERR : APLOG_DEBUG, 0, session->c, APLOGNO(02936) "h2_stream(%ld-%d): resuming stream %s", session->id, stream->id, nghttp2_strerror(rv)); } } return 1; }