You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mm...@apache.org on 2004/02/02 19:21:08 UTC
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_status.c
mmanders 2004/02/02 10:21:08
Modified: jk/native2/common jk_worker_status.c
Log:
Fix problem dereferencing a NULL value if shared memory/scoreboard information isn't available. Patch provided by Guenter Knauf and NormW.
Revision Changes Path
1.46 +11 -5 jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c
Index: jk_worker_status.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- jk_worker_status.c 30 Oct 2003 20:08:36 -0000 1.45
+++ jk_worker_status.c 2 Feb 2004 18:21:08 -0000 1.46
@@ -717,7 +717,7 @@
}
}
/* Create a top section - not used currently */
- s->jkprintf(env, s, "MXAgent: mod_jk\n" );
+ s->jkprintf(env, s, "MXAgent: mod_jk2\n" );
s->jkprintf(env, s, "\n" );
for( i=0; i < env->_objects->size( env, env->_objects ); i++ ) {
@@ -1004,9 +1004,12 @@
/* Update the scoreboard's version - all other
jk2 processes will see this and update
*/
- if( shm!=NULL && shm->head!=NULL )
+ if( shm!=NULL && shm->head!=NULL ) {
shm->head->lbVer++;
- s->jkprintf(env, s, "Updated config %d", shm->head->lbVer );
+ s->jkprintf(env, s, "Updated config version to %d\n", shm->head->lbVer );
+ } else {
+ s->jkprintf(env, s, "Update detected. No scoreboard.\n" );
+ }
}
@@ -1017,9 +1020,12 @@
/* Update the scoreboard's version - all other
jk2 processes will see this and update
*/
- if( shm!=NULL && shm->head!=NULL )
+ if( shm!=NULL && shm->head!=NULL ) {
shm->head->lbVer++;
- s->jkprintf(env, s, "Updated config version to %d\n", shm->head->lbVer );
+ s->jkprintf(env, s, "Updated config version to %d\n", shm->head->lbVer );
+ } else {
+ s->jkprintf(env, s, "Reload requested. No scoreboard.\n" );
+ }
return JK_OK;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org