From: Yann Ylavic Date: Thu, 2 Jul 2020 00:33:46 +0000 (+0000) Subject: mpm_common: remove ap_mpm_unregister_poll_callback(). X-Git-Tag: 2.5.0-alpha2-ci-test-only~1299 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f6cc1d2be697c89a0592cb9e447c3d03a5a9dad;p=thirdparty%2Fapache%2Fhttpd.git mpm_common: remove ap_mpm_unregister_poll_callback(). It's now called automatically by mpm_event and anyway can't be called safely outside the MPM code without racing. MAJOR bump. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879422 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 36961f50002..5a26b3eb5f9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.1 + *) mpm_common: remove ap_mpm_unregister_poll_callback() and + mpm_unregister_poll_callback hook. [Yann Ylavic] + *) mod_proxy_http: add asynchronous handling of Upgrade(d) protocols, where idle connections are returned to the MPM and rescheduled on another thread when ready. [Yann Ylavic] diff --git a/include/ap_mmn.h b/include/ap_mmn.h index ce9840c79ca..9bd6b01b84e 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -646,14 +646,16 @@ * 20200420.9 (2.5.1-dev) Add hooks deliver_report and gather_reports to * mod_dav.h. * 20200420.10 (2.5.1-dev) Add method_precondition hook to mod_dav.h. + * 20200701.0 (2.5.1-dev) Axe ap_mpm_unregister_poll_callback and + * mpm_unregister_poll_callback hook. */ #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */ #ifndef MODULE_MAGIC_NUMBER_MAJOR -#define MODULE_MAGIC_NUMBER_MAJOR 20200420 +#define MODULE_MAGIC_NUMBER_MAJOR 20200701 #endif -#define MODULE_MAGIC_NUMBER_MINOR 10 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/ap_mpm.h b/include/ap_mpm.h index 633ea1faace..f446587836f 100644 --- a/include/ap_mpm.h +++ b/include/ap_mpm.h @@ -242,16 +242,6 @@ AP_DECLARE(apr_status_t) ap_mpm_register_poll_callback_timeout( ap_mpm_callback_fn_t *tofn, void *baton, apr_time_t timeout); -/** -* Unregister a previously registered callback. -* @param pfds Array of apr_pollfd_t -* @return APR_SUCCESS if all sockets/pipes could be removed from the pollset, -* APR_ENOTIMPL if no asynch support, or an apr_pollset_remove error. -* @remark This function triggers the cleanup registered on the pool p during -* callback registration. -*/ -AP_DECLARE(apr_status_t) ap_mpm_unregister_poll_callback(apr_array_header_t *pfds); - typedef enum mpm_child_status { MPM_CHILD_STARTED, MPM_CHILD_EXITED, diff --git a/include/mpm_common.h b/include/mpm_common.h index 480696aeccd..673c470064a 100644 --- a/include/mpm_common.h +++ b/include/mpm_common.h @@ -440,13 +440,6 @@ AP_DECLARE_HOOK(apr_status_t, mpm_register_poll_callback_timeout, void *baton, apr_time_t timeout)) -/** - * Unregister the specified callback - * @ingroup hooks - */ -AP_DECLARE_HOOK(apr_status_t, mpm_unregister_poll_callback, - (apr_array_header_t *pds)) - /** Resume the suspended connection * @ingroup hooks */ diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index 97bc695b216..4ef72b328f2 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -1665,10 +1665,6 @@ static apr_status_t event_register_poll_callback(apr_array_header_t *pfds, baton, 0 /* no timeout */); } -static apr_status_t event_unregister_poll_callback(apr_array_header_t *pfds) -{ - return apr_pool_cleanup_run(pfds->pool, pfds, event_cleanup_poll_callback); -} /* * Close socket and clean up if remote closed its end while we were in @@ -4081,8 +4077,6 @@ static void event_hooks(apr_pool_t * p) APR_HOOK_MIDDLE); ap_hook_mpm_register_poll_callback_timeout(event_register_poll_callback_ex, NULL, NULL, APR_HOOK_MIDDLE); - ap_hook_mpm_unregister_poll_callback(event_unregister_poll_callback, NULL, NULL, - APR_HOOK_MIDDLE); ap_hook_pre_read_request(event_pre_read_request, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_post_read_request(event_post_read_request, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_mpm_get_name(event_get_name, NULL, NULL, APR_HOOK_MIDDLE); diff --git a/server/mpm_common.c b/server/mpm_common.c index 6a7a3a8b370..f63f84538d7 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -70,7 +70,6 @@ APR_HOOK_LINK(mpm_register_timed_callback) \ APR_HOOK_LINK(mpm_register_poll_callback) \ APR_HOOK_LINK(mpm_register_poll_callback_timeout) \ - APR_HOOK_LINK(mpm_unregister_poll_callback) \ APR_HOOK_LINK(mpm_get_name) \ APR_HOOK_LINK(mpm_resume_suspended) \ APR_HOOK_LINK(end_generation) \ @@ -116,9 +115,6 @@ AP_IMPLEMENT_HOOK_RUN_FIRST(apr_status_t, mpm_register_poll_callback, AP_IMPLEMENT_HOOK_RUN_FIRST(apr_status_t, mpm_register_poll_callback_timeout, (apr_array_header_t *pds, ap_mpm_callback_fn_t *cbfn, ap_mpm_callback_fn_t *tofn, void *baton, apr_time_t timeout), (pds, cbfn, tofn, baton, timeout), APR_ENOTIMPL) -AP_IMPLEMENT_HOOK_RUN_FIRST(apr_status_t, mpm_unregister_poll_callback, - (apr_array_header_t *pds), - (pds), APR_ENOTIMPL) AP_IMPLEMENT_HOOK_RUN_FIRST(int, output_pending, (conn_rec *c), (c), DECLINED) AP_IMPLEMENT_HOOK_RUN_FIRST(int, input_pending, @@ -585,12 +581,6 @@ AP_DECLARE(apr_status_t) ap_mpm_register_poll_callback_timeout( timeout); } -AP_DECLARE(apr_status_t) ap_mpm_unregister_poll_callback( - apr_array_header_t *pfds) -{ - return ap_run_mpm_unregister_poll_callback(pfds); -} - AP_DECLARE(const char *)ap_show_mpm(void) { const char *name = ap_run_mpm_get_name();