mturk 2004/03/13 00:49:26
Modified: jk/native2/server/apache2 mod_jk2.c
Log:
Use the maxDaemon from workerEnv, and query the mpm on jk2_init.
Also on single child mpm's use the pid for a child id.
Revision Changes Path
1.77 +10 -7 jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c
Index: mod_jk2.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- mod_jk2.c 12 Mar 2004 13:47:20 -0000 1.76
+++ mod_jk2.c 13 Mar 2004 08:49:26 -0000 1.77
@@ -474,6 +474,8 @@
workerEnv->init(env, workerEnv );
workerEnv->server_name = (char *)ap_get_server_version();
+ ap_mpm_query(AP_MPMQ_MAX_DAEMONS, &workerEnv->maxDaemons);
+
/* Should be done in post config instead (cf DAV2) */
/* ap_add_version_component(pconf, JK_EXPOSED_VERSION); */
apr_pool_cleanup_register(pconf, NULL, jk2_shutdown, apr_pool_cleanup_null);
@@ -586,11 +588,12 @@
* and fix the mpm_winnt reporting 0 daemons.
*/
if (workerEnv->childId == -1) {
- int max_daemons_limit;
- ap_mpm_query(AP_MPMQ_MAX_DAEMONS, &max_daemons_limit);
-
- if (max_daemons_limit == 0) {
- workerEnv->childId = 0;
+ /* If the server max daemons are less then 2
+ * this is the single child mpm.
+ * the WINNT mpm has a bug returning 0 instead 1
+ */
+ if (workerEnv->maxDaemons < 2) {
+ workerEnv->childId = proc.pid;
env->l->jkLog(env, env->l, JK_LOG_INFO,
"jk2_init() Setting scoreboard slot 0 for child %d\n",
proc.pid);
@@ -598,7 +601,7 @@
else {
env->l->jkLog(env, env->l, JK_LOG_ERROR,
"jk2_init() Can't find child %d in none of the %d scoreboard
slots\n",
- proc.pid, max_daemons_limit);
+ proc.pid, workerEnv->maxDaemons);
workerEnv->childId = -2;
}
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]