"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mod_http2/h2_mplx.c" between
mod_http2-1.15.14.tar.gz and mod_http2-1.15.16.tar.gz

About: mod_h[ttp]2 is an Apache httpd module implementing the HTTP2 protocol. It uses nghttp2 as base engine and connects it with the Apache infrastructure. Hint: Module (previous name "mod_h2") now integrated into Apache httpd (since v2.4.17). Experimental release.

h2_mplx.c  (mod_http2-1.15.14):h2_mplx.c  (mod_http2-1.15.16)
skipping to change at line 93 skipping to change at line 93
apr_thread_mutex_lock(m->lock) apr_thread_mutex_lock(m->lock)
#define H2_MPLX_ENTER_MAYBE(m, dolock) \ #define H2_MPLX_ENTER_MAYBE(m, dolock) \
if (dolock) apr_thread_mutex_lock(m->lock) if (dolock) apr_thread_mutex_lock(m->lock)
#define H2_MPLX_LEAVE_MAYBE(m, dolock) \ #define H2_MPLX_LEAVE_MAYBE(m, dolock) \
if (dolock) apr_thread_mutex_unlock(m->lock) if (dolock) apr_thread_mutex_unlock(m->lock)
static void mst_check_data_for(h2_mplx *m, h2_stream *stream, int mplx_is_locked ); static void mst_check_data_for(h2_mplx *m, h2_stream *stream, int mplx_is_locked );
static void mst_stream_output_consumed(void *ctx, h2_bucket_beam *beam, apr_off_
t length)
{
}
static void mst_stream_input_ev(void *ctx, h2_bucket_beam *beam) static void mst_stream_input_ev(void *ctx, h2_bucket_beam *beam)
{ {
h2_stream *stream = ctx; h2_stream *stream = ctx;
h2_mplx *m = stream->session->mplx; h2_mplx *m = stream->session->mplx;
apr_atomic_set32(&m->event_pending, 1); apr_atomic_set32(&m->event_pending, 1);
} }
static void m_stream_input_consumed(void *ctx, h2_bucket_beam *beam, apr_off_t l ength) static void m_stream_input_consumed(void *ctx, h2_bucket_beam *beam, apr_off_t l ength)
{ {
h2_stream_in_consumed(ctx, length); h2_stream_in_consumed(ctx, length);
skipping to change at line 301 skipping to change at line 297
} }
if (stream->task) { if (stream->task) {
h2_task *task = stream->task; h2_task *task = stream->task;
conn_rec *secondary; conn_rec *secondary;
int reuse_secondary = 0; int reuse_secondary = 0;
stream->task = NULL; stream->task = NULL;
secondary = task->c; secondary = task->c;
if (secondary) { if (secondary) {
/* On non-serialized requests, the IO logging has not accounted for
any
* meta data send over the network: response headers and h2 frame he
aders. we
* counted this on the stream and need to add this now.
* This is supposed to happen before the EOR bucket triggers the
* logging of the transaction. *fingers crossed* */
if (task->request && !task->request->serialize && h2_task_logio_add_
bytes_out) {
apr_off_t unaccounted = stream->out_frame_octets - stream->out_d
ata_octets;
if (unaccounted > 0) {
h2_task_logio_add_bytes_out(secondary, unaccounted);
}
}
if (m->s->keep_alive_max == 0 || secondary->keepalives < m->s->keep_ alive_max) { if (m->s->keep_alive_max == 0 || secondary->keepalives < m->s->keep_ alive_max) {
reuse_secondary = ((m->spare_secondary->nelts < (m->limit_active * 3 / 2)) reuse_secondary = ((m->spare_secondary->nelts < (m->limit_active * 3 / 2))
&& !task->rst_error); && !task->rst_error);
} }
if (reuse_secondary) { if (reuse_secondary) {
h2_beam_log(task->output.beam, m->c, APLOG_DEBUG, h2_beam_log(task->output.beam, m->c, APLOG_DEBUG,
APLOGNO(03385) "h2_task_destroy, reuse secondary"); APLOGNO(03385) "h2_task_destroy, reuse secondary");
h2_task_destroy(task); h2_task_destroy(task);
APR_ARRAY_PUSH(m->spare_secondary, conn_rec*) = secondary; APR_ARRAY_PUSH(m->spare_secondary, conn_rec*) = secondary;
skipping to change at line 542 skipping to change at line 526
stream->output = beam; stream->output = beam;
if (APLOGctrace2(m->c)) { if (APLOGctrace2(m->c)) {
h2_beam_log(beam, stream->task->c, APLOG_TRACE2, "out_open"); h2_beam_log(beam, stream->task->c, APLOG_TRACE2, "out_open");
} }
else { else {
ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->task->c, ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->task->c,
"h2_mplx(%s): out open", stream->task->id); "h2_mplx(%s): out open", stream->task->id);
} }
h2_beam_on_consumed(stream->output, NULL, mst_stream_output_consumed, stream );
h2_beam_on_produced(stream->output, mst_output_produced, stream); h2_beam_on_produced(stream->output, mst_output_produced, stream);
if (stream->task->output.copy_files) { if (stream->task->output.copy_files) {
h2_beam_on_file_beam(stream->output, h2_beam_no_files, NULL); h2_beam_on_file_beam(stream->output, h2_beam_no_files, NULL);
} }
/* we might see some file buckets in the output, see /* we might see some file buckets in the output, see
* if we have enough handles reserved. */ * if we have enough handles reserved. */
mst_check_data_for(m, stream, 1); mst_check_data_for(m, stream, 1);
return APR_SUCCESS; return APR_SUCCESS;
} }
 End of changes. 3 change blocks. 
22 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)