From e82772e29f002987306dc2ebb271ef830da85bf6 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 25 Mar 2009 18:57:09 +0000 Subject: [PATCH] fix mpm_get_name hook a string can't be used as the declined value since the hook macro must compare retcodes from hooks with that declined value (thanks, gcc/Joe) accommodate in ap_show_mpm() since we don't want to return NULL to the caller of this simple API git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758406 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm_common.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/mpm_common.c b/server/mpm_common.c index 6e92db3c60..d326a01870 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -104,7 +104,7 @@ AP_IMPLEMENT_HOOK_RUN_FIRST(apr_status_t, mpm_register_timed_callback, (t, cbfn, baton), APR_ENOTIMPL) AP_IMPLEMENT_HOOK_RUN_FIRST(const char *, mpm_get_name, (void), - (), "") + (), NULL) /* number of calls to wait_or_timeout between writable probes */ #ifndef INTERVAL_OF_WRITABLE_PROBES @@ -442,5 +442,11 @@ AP_DECLARE(apr_status_t) ap_mpm_register_timed_callback(apr_time_t t, ap_mpm_cal AP_DECLARE(const char *)ap_show_mpm(void) { - return ap_run_mpm_get_name(); + const char *name = ap_run_mpm_get_name(); + + if (!name) { + name = ""; + } + + return name; } -- 2.50.1