status = apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, pool);
if (status != APR_SUCCESS) {
ap_log_cerror(APLOG_MARK, APLOG_ERR, status, master,
- APLOGNO() "h2_session(%ld-%d): create slave mutex",
+ APLOGNO(10004) "h2_session(%ld-%d): create slave mutex",
master->id, slave_id);
apr_pool_destroy(pool);
return NULL;
ptrans);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rc,
- ap_server_conf, APLOGNO()
+ ap_server_conf, APLOGNO(10003)
"Failed to create transaction pool mutex");
ap_push_pool(worker_queue_info, ptrans);
signal_threads(ST_GRACEFUL);
#ifndef NO_USE_SIGACTION
struct sigaction sa;
+ memset(&sa, 0, sizeof sa);
sigemptyset(&sa.sa_mask);
#if defined(SA_ONESHOT)
sa.sa_flags = SA_ONESHOT;
#elif defined(SA_RESETHAND)
sa.sa_flags = SA_RESETHAND;
-#else
- sa.sa_flags = 0;
#endif
sa.sa_handler = sig_coredump;
AP_CORE_DECLARE_NONSTD(apr_status_t) ap_request_core_filter(ap_filter_t *f,
apr_bucket_brigade *bb)
{
+ extern module http_module;
apr_bucket *flush_upto = NULL;
apr_status_t status = APR_SUCCESS;
+ http_conn_config *conn_cfg = ap_get_module_config(f->c->conn_config, &http_module);
apr_bucket_brigade *tmp_bb = f->ctx;
/*
if (!tmp_bb) {
tmp_bb = f->ctx = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
}
+ APR_BRIGADE_CONCAT(tmp_bb, bb);
/* Reinstate any buffered content */
- ap_filter_reinstate_brigade(f, bb, &flush_upto);
+ ap_filter_reinstate_brigade(f, tmp_bb, &flush_upto);
- while (!APR_BRIGADE_EMPTY(bb)) {
- apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
+ while (!APR_BRIGADE_EMPTY(tmp_bb)) {
+ apr_bucket *bucket = APR_BRIGADE_FIRST(tmp_bb);
/* if the core has set aside data, back off and try later */
if (!flush_upto) {
/* pass each bucket down the chain */
APR_BUCKET_REMOVE(bucket);
- APR_BRIGADE_INSERT_TAIL(tmp_bb, bucket);
+ APR_BRIGADE_INSERT_TAIL(bb, bucket);
+ status = ap_pass_brigade(f->next, bb);
+ apr_brigade_cleanup(bb);
- status = ap_pass_brigade(f->next, tmp_bb);
if (!APR_STATUS_IS_EOF(status) && (status != APR_SUCCESS)) {
return status;
}
-
}
- ap_filter_setaside_brigade(f, bb);
+ ap_filter_setaside_brigade(f, tmp_bb);
return status;
}