diff options
author | Jeff Trawick <trawick@apache.org> | 2009-03-25 19:57:09 +0100 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2009-03-25 19:57:09 +0100 |
commit | e82772e29f002987306dc2ebb271ef830da85bf6 (patch) | |
tree | 66d8b58b97228c4d953650a7246494247bd6d01a /server/mpm_common.c | |
parent | no ap_my_generation (diff) | |
download | apache2-e82772e29f002987306dc2ebb271ef830da85bf6.tar.xz apache2-e82772e29f002987306dc2ebb271ef830da85bf6.zip |
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
Diffstat (limited to '')
-rw-r--r-- | server/mpm_common.c | 10 |
1 files 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; } |