MCPcopy Create free account
hub / github.com/apache/httpd / c1_process_stream

Function c1_process_stream

modules/http2/h2_mplx.c:703–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

701}
702
703static apr_status_t c1_process_stream(h2_mplx *m,
704 h2_stream *stream,
705 h2_stream_pri_cmp_fn *cmp,
706 h2_session *session)
707{
708 apr_status_t rv = APR_SUCCESS;
709
710 if (m->aborted) {
711 rv = APR_ECONNABORTED;
712 goto cleanup;
713 }
714 if (!stream->request) {
715 rv = APR_EINVAL;
716 goto cleanup;
717 }
718 if (APLOGctrace1(m->c1)) {
719 const h2_request *r = stream->request;
720 ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c1,
721 H2_STRM_MSG(stream, "process %s%s%s %s%s%s%s"),
722 r->protocol? r->protocol : "",
723 r->protocol? " " : "",
724 r->method, r->scheme? r->scheme : "",
725 r->scheme? "://" : "",
726 r->authority, r->path? r->path: "");
727 }
728
729 stream->scheduled = 1;
730 h2_ihash_add(m->streams, stream);
731 if (h2_stream_is_ready(stream)) {
732 /* already have a response */
733 ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c1,
734 H2_STRM_MSG(stream, "process, ready already"));
735 }
736 else {
737 /* last chance to set anything up before stream is processed
738 * by worker threads. */
739 rv = h2_stream_prepare_processing(stream);
740 if (APR_SUCCESS != rv) goto cleanup;
741 h2_iq_add(m->q, stream->id, cmp, session);
742 ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c1,
743 H2_STRM_MSG(stream, "process, added to q"));
744 }
745
746cleanup:
747 return rv;
748}
749
750void h2_mplx_c1_process(h2_mplx *m,
751 h2_iqueue *ready_to_process,

Callers 1

h2_mplx_c1_processFunction · 0.85

Calls 4

h2_ihash_addFunction · 0.85
h2_stream_is_readyFunction · 0.85
h2_iq_addFunction · 0.85

Tested by

no test coverage detected