From 8f840cb763aa67f331cecc4e5e850bb07d2a9943 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sat, 21 Aug 2010 18:06:41 +0000 Subject: core: Abort with sensible error message if no or more than one MPM is loaded. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@987806 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm_common.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'server/mpm_common.c') diff --git a/server/mpm_common.c b/server/mpm_common.c index 56bc70c875..e45a089447 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -375,3 +375,13 @@ AP_DECLARE(const char *)ap_show_mpm(void) return name; } + +AP_DECLARE(const char *)ap_check_mpm(void) +{ + if (!_hooks.link_mpm || _hooks.link_mpm->nelts == 0) + return "No MPM loaded."; + else if (_hooks.link_mpm->nelts > 1) + return "More than one MPM loaded."; + else + return NULL; +} -- cgit v1.2.3