You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2009/03/25 19:57:12 UTC

svn commit: r758406 - /httpd/httpd/trunk/server/mpm_common.c

Author: trawick
Date: Wed Mar 25 18:57:09 2009
New Revision: 758406

URL: http://svn.apache.org/viewvc?rev=758406&view=rev
Log:
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

Modified:
    httpd/httpd/trunk/server/mpm_common.c

Modified: httpd/httpd/trunk/server/mpm_common.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm_common.c?rev=758406&r1=758405&r2=758406&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm_common.c (original)
+++ httpd/httpd/trunk/server/mpm_common.c Wed Mar 25 18:57:09 2009
@@ -104,7 +104,7 @@
                             (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(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;
 }