summaryrefslogtreecommitdiffstats
path: root/server/mpm/winnt
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2009-04-01 13:53:50 +0200
committerJeff Trawick <trawick@apache.org>2009-04-01 13:53:50 +0200
commit23ac01a833c74e3ca1f92f66f295a993ad224d35 (patch)
treec42fcf56e21d076c4bd6f9ef56266a7b2e130300 /server/mpm/winnt
parentstop exporting APACHE_MPM_DIR to modules -- unclear why this was ever necessa... (diff)
downloadapache2-23ac01a833c74e3ca1f92f66f295a993ad224d35.tar.xz
apache2-23ac01a833c74e3ca1f92f66f295a993ad224d35.zip
mpm-query hook: distinguish between DECLINED and APR_ENOTIMPL so that
. ap_mpm_query() can return APR_EGENERAL if called too early (for debugging a module) . some hypothetical module which implements the mpm-query hook can bypass the MPM with APR_ENOTIMPL git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@760864 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/mpm/winnt')
-rw-r--r--server/mpm/winnt/mpm_winnt.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c
index 753543c97f..dcbf00d5ea 100644
--- a/server/mpm/winnt/mpm_winnt.c
+++ b/server/mpm/winnt/mpm_winnt.c
@@ -893,53 +893,57 @@ apr_array_header_t *mpm_new_argv;
* service after we preflight the config.
*/
-static apr_status_t winnt_query(int query_code, int *result)
+static int winnt_query(int query_code, int *result, apr_status_t *rv)
{
- switch(query_code){
+ *rv = APR_SUCCESS;
+ switch (query_code) {
case AP_MPMQ_MAX_DAEMON_USED:
*result = MAXIMUM_WAIT_OBJECTS;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_IS_THREADED:
*result = AP_MPMQ_STATIC;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_IS_FORKED:
*result = AP_MPMQ_NOT_SUPPORTED;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_HARD_LIMIT_DAEMONS:
*result = HARD_SERVER_LIMIT;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_HARD_LIMIT_THREADS:
*result = thread_limit;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_MAX_THREADS:
*result = ap_threads_per_child;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_MIN_SPARE_DAEMONS:
*result = 0;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_MIN_SPARE_THREADS:
*result = 0;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_MAX_SPARE_DAEMONS:
*result = 0;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_MAX_SPARE_THREADS:
*result = 0;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_MAX_REQUESTS_DAEMON:
*result = ap_max_requests_per_child;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_MAX_DAEMONS:
*result = 0;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_MPM_STATE:
*result = winnt_mpm_state;
- return APR_SUCCESS;
+ break;
case AP_MPMQ_GENERATION:
*result = my_generation;
- return APR_SUCCESS;
+ break;
+ default:
+ *rv = APR_ENOTIMPL;
+ break;
}
- return APR_ENOTIMPL;
+ return OK;
}
static const char *winnt_get_name(void)