]> granicus.if.org Git - apache/commitdiff
Fold the compiled-in knowledge of the allowable AcceptMutex settings into
authorJim Jagielski <jim@apache.org>
Wed, 20 Mar 2002 22:19:11 +0000 (22:19 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 20 Mar 2002 22:19:11 +0000 (22:19 +0000)
its help entry. Requires the use of a extern string rather than a function
call for the initialization to be valid in the macro (Thx to Jeff!).
In the meantime, bump down the error logging until we deal with true
default and configured setting information ala 1.3.

PR:
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94062 13f79535-47bb-0310-9956-ffa450edef68

include/mpm_common.h
server/core.c
server/mpm/experimental/perchild/perchild.c
server/mpm/mpmt_os2/mpmt_os2.c
server/mpm/netware/mpm_netware.c
server/mpm/perchild/perchild.c
server/mpm/prefork/prefork.c
server/mpm/worker/worker.c
server/mpm_common.c

index 6784328fb2af0d874a6b833d2573702e0b696ac7..4afffaf6f5ea72914c7ab4b127cef3dee021f322 100644 (file)
@@ -259,7 +259,7 @@ const char *ap_mpm_set_lockfile(cmd_parms *cmd, void *dummy,
  */
 #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
 extern apr_lockmech_e ap_accept_lock_mech;
-const char *ap_mpm_show_accept_lock_mech(void);
+extern const char ap_valid_accept_mutex_string[];
 const char *ap_mpm_set_accept_lock_mech(cmd_parms *cmd, void *dummy,
                                         const char *arg);
 #endif
index 18f54c0db4b3f9cf4d7454c2a4b848399ef3aade..863b571b580fa393dcc434af1a08adccbc4bf542 100644 (file)
@@ -3003,7 +3003,7 @@ AP_INIT_TAKE1("CoreDumpDirectory", ap_mpm_set_coredumpdir, NULL, RSRC_CONF, \
 #endif
 #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
 AP_INIT_TAKE1("AcceptMutex", ap_mpm_set_accept_lock_mech, NULL, RSRC_CONF, \
-              "The system mutex implementation to use for the accept mutex"),
+              ap_valid_accept_mutex_string),
 #endif
 { NULL }
 };
index 94a3d0a0776f7acb8b7b3dd023ead5b0db220dfa..0cd864485953bd11df2e48da928edfd7ac713c8e 100644 (file)
@@ -1339,8 +1339,8 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf,
                  "Server built: %s", ap_get_server_built());
 #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
-    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
-               "AcceptMutex: %s", ap_mpm_show_accept_lock_mech());
+    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf,
+               "AcceptMutex: %s", ap_valid_accept_mutex_string);
 #endif
     restart_pending = shutdown_pending = 0;
 
index c1204b65a3bc444bd290f2cdbbe607b1a9421200..b4689488611e88ca8cfa661363823e216b8a8c07 100644 (file)
@@ -314,8 +314,8 @@ static char master_main()
     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf,
                "Server built: %s", ap_get_server_built());
 #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
-    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
-               "AcceptMutex: %s", ap_mpm_show_accept_lock_mech());
+    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf,
+               "AcceptMutex: %s", ap_valid_accept_mutex_string);
 #endif
     if (one_process) {
         ap_scoreboard_image->parent[0].pid = getpid();
index 952880b5dc3dd9614f340807c167cf1d928cf089..a84d0801c899f5ebd343ebb1e1d8f4631b7cf331 100644 (file)
@@ -918,8 +918,8 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf,
                "Server built: %s", ap_get_server_built());
 #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
-    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
-               "AcceptMutex: %s", ap_mpm_show_accept_lock_mech());
+    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf,
+               "AcceptMutex: %s", ap_valid_accept_mutex_string);
 #endif
     show_server_data();
 
index 94a3d0a0776f7acb8b7b3dd023ead5b0db220dfa..0cd864485953bd11df2e48da928edfd7ac713c8e 100644 (file)
@@ -1339,8 +1339,8 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf,
                  "Server built: %s", ap_get_server_built());
 #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
-    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
-               "AcceptMutex: %s", ap_mpm_show_accept_lock_mech());
+    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf,
+               "AcceptMutex: %s", ap_valid_accept_mutex_string);
 #endif
     restart_pending = shutdown_pending = 0;
 
index 81fc57607701c3caf97c42659b96134ed30a0517..f48176d0e83fd0cf98909d4dea0692d0b6adb0de 100644 (file)
@@ -1025,8 +1025,8 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf,
                "Server built: %s", ap_get_server_built());
 #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
-    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
-               "AcceptMutex: %s", ap_mpm_show_accept_lock_mech());
+    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf,
+               "AcceptMutex: %s", ap_valid_accept_mutex_string);
 #endif
     restart_pending = shutdown_pending = 0;
 
index 826278c0a711a0a0c1e2245871543195982094b3..0c330bfa06143477dde73e531eebdc6fcb095ec7 100644 (file)
@@ -1557,8 +1557,8 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf,
                 "Server built: %s", ap_get_server_built());
 #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
-    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
-               "AcceptMutex: %s", ap_mpm_show_accept_lock_mech());
+    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf,
+               "AcceptMutex: %s", ap_valid_accept_mutex_string);
 #endif
     restart_pending = shutdown_pending = 0;
 
index 1053f0bb7a261e1f1dd5604b44872166837af071..f728464ea005c64eeac1e7132ed8dd4c5fab0d4e 100644 (file)
@@ -662,24 +662,21 @@ const char *ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy,
 #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
 apr_lockmech_e ap_accept_lock_mech = APR_LOCK_DEFAULT;
 
-AP_DECLARE(const char *) ap_mpm_show_accept_lock_mech(void)
-{
-
-    return ("Valid accept mutexes for this platform and MPM are: default"
+const char ap_valid_accept_mutex_string[] =
+    "Valid accept mutexes for this platform and MPM are: default"
 #if APR_HAS_FLOCK_SERIALIZE
-                           ", flock"
+    ", flock"
 #endif
 #if APR_HAS_FCNTL_SERIALIZE
-                           ", fcntl"
+    ", fcntl"
 #endif
 #if APR_HAS_SYSVSEM_SERIALIZE && !defined(PERCHILD_MPM)
-                           ", sysvsem"
+    ", sysvsem"
 #endif
 #if APR_HAS_PROC_PTHREAD_SERIALIZE
-                           ", pthread"
+    ", pthread"
 #endif
-                           ".");
-}
+    ".";
 
 AP_DECLARE(const char *) ap_mpm_set_accept_lock_mech(cmd_parms *cmd,
                                                      void *dummy,
@@ -721,7 +718,7 @@ AP_DECLARE(const char *) ap_mpm_set_accept_lock_mech(cmd_parms *cmd,
 #endif
     else {
         return apr_pstrcat(cmd->pool, arg, " is an invalid mutex mechanism; ",
-                           ap_mpm_show_accept_lock_mech(), NULL);
+                           ap_valid_accept_mutex_string, NULL);
     }
     return NULL;
 }