From: Yann Ylavic Date: Mon, 20 Feb 2017 13:53:16 +0000 (+0000) Subject: Revert r1783759: really more things than intended :p X-Git-Tag: 2.5.0-alpha~641 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6699f4e509ad1ef2d4283e2d5d733382599ba74a;p=apache Revert r1783759: really more things than intended :p git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783760 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number index 3cd74ff17f..386586617c 100644 --- a/docs/log-message-tags/next-number +++ b/docs/log-message-tags/next-number @@ -1 +1 @@ -10004 +10003 diff --git a/include/mod_core.h b/include/mod_core.h index cb88db7dc7..8eab3e12c4 100644 --- a/include/mod_core.h +++ b/include/mod_core.h @@ -45,10 +45,6 @@ AP_DECLARE_DATA extern ap_filter_rec_t *ap_chunk_filter_handle; AP_DECLARE_DATA extern ap_filter_rec_t *ap_http_outerror_filter_handle; AP_DECLARE_DATA extern ap_filter_rec_t *ap_byterange_filter_handle; -typedef struct { - apr_bucket_brigade *tmp_bb; -} http_conn_config; - /* * These (input) filters are internal to the mod_core operation. */ diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index a342e2794d..9f69d8adf9 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -3783,7 +3783,6 @@ static apr_status_t send_parsed_content(ap_filter_t *f, apr_bucket_brigade *bb) /* if something's left over, pass it along */ if (!APR_BRIGADE_EMPTY(pass_bb)) { rv = ap_pass_brigade(f->next, pass_bb); - apr_brigade_cleanup(pass_bb); } else { rv = APR_SUCCESS; diff --git a/modules/http2/h2_conn.c b/modules/http2/h2_conn.c index 7b504d0ee0..a8de28425b 100644 --- a/modules/http2/h2_conn.c +++ b/modules/http2/h2_conn.c @@ -280,7 +280,7 @@ conn_rec *h2_slave_create(conn_rec *master, int slave_id, apr_pool_t *parent) 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(10004) "h2_session(%ld-%d): create slave mutex", + APLOGNO() "h2_session(%ld-%d): create slave mutex", master->id, slave_id); apr_pool_destroy(pool); return NULL; diff --git a/server/main.c b/server/main.c index da7e1d2512..351f0f1a56 100644 --- a/server/main.c +++ b/server/main.c @@ -735,8 +735,6 @@ int main(int argc, const char * const argv[]) apr_pool_clear(pconf); ap_clear_auth_internal(); - apr_sleep(apr_time_from_sec(10)); - ap_main_state = AP_SQ_MS_CREATE_CONFIG; ap_config_generation++; for (mod = ap_prelinked_modules; *mod != NULL; mod++) { diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index bd89d033f7..151c920b0a 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -2135,7 +2135,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy) ptrans); if (rc != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_CRIT, rc, - ap_server_conf, APLOGNO(10003) + ap_server_conf, APLOGNO() "Failed to create transaction pool mutex"); ap_push_pool(worker_queue_info, ptrans); signal_threads(ST_GRACEFUL); diff --git a/server/mpm_unix.c b/server/mpm_unix.c index fb589fda2f..cd3bc52d51 100644 --- a/server/mpm_unix.c +++ b/server/mpm_unix.c @@ -1015,13 +1015,14 @@ AP_DECLARE(apr_status_t) ap_fatal_signal_setup(server_rec *s, #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; diff --git a/server/request.c b/server/request.c index 5bc3bf36c1..5336eb26d0 100644 --- a/server/request.c +++ b/server/request.c @@ -2040,10 +2040,8 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_sub_req_output_filter(ap_filter_t *f, 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; /* @@ -2058,13 +2056,12 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_request_core_filter(ap_filter_t *f, 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, tmp_bb, &flush_upto); + ap_filter_reinstate_brigade(f, bb, &flush_upto); - while (!APR_BRIGADE_EMPTY(tmp_bb)) { - apr_bucket *bucket = APR_BRIGADE_FIRST(tmp_bb); + while (!APR_BRIGADE_EMPTY(bb)) { + apr_bucket *bucket = APR_BRIGADE_FIRST(bb); /* if the core has set aside data, back off and try later */ if (!flush_upto) { @@ -2094,16 +2091,16 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_request_core_filter(ap_filter_t *f, /* pass each bucket down the chain */ APR_BUCKET_REMOVE(bucket); - APR_BRIGADE_INSERT_TAIL(bb, bucket); - status = ap_pass_brigade(f->next, bb); - apr_brigade_cleanup(bb); + APR_BRIGADE_INSERT_TAIL(tmp_bb, bucket); + status = ap_pass_brigade(f->next, tmp_bb); if (!APR_STATUS_IS_EOF(status) && (status != APR_SUCCESS)) { return status; } + } - ap_filter_setaside_brigade(f, tmp_bb); + ap_filter_setaside_brigade(f, bb); return status; }