Hi, since the increment of shm->head->lbVer is protected it should also be avoided to print a potential NULL value:
http://www.gknw.com/test/jk_worker_status.c.diff ========================================================================= --- ./jk/native2/common/jk_worker_status.c.orig Fri Oct 31 00:15:04 2003 +++ ./jk/native2/common/jk_worker_status.c Mon Feb 02 17:47:48 2004 @@ -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; } Guenter. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]