tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_endpoint.c jk_shm.c
Date Sun, 26 Oct 2003 19:16:22 GMT
costin      2003/10/26 11:16:22

  Modified:    jk/native2/common jk_endpoint.c jk_shm.c
  Log:
  Jk endpoint shouldn't fail if the shm slot can't be created. The shm is used for
  statistics ( jk_shm and the status worker ).
  
  Revision  Changes    Path
  1.25      +7 -4      jakarta-tomcat-connectors/jk/native2/common/jk_endpoint.c
  
  Index: jk_endpoint.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_endpoint.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- jk_endpoint.c	5 Mar 2003 00:01:49 -0000	1.24
  +++ jk_endpoint.c	26 Oct 2003 19:16:22 -0000	1.25
  @@ -89,11 +89,14 @@
               if (wEnv->epStat==NULL) {
                   env->l->jkLog(env, env->l, JK_LOG_ERROR,
                                 "workerEnv.init() create slot %s failed\n",  shmName );
  -                return JK_ERR;
  -            }
  -            wEnv->epStat->structCnt=0;
  -            env->l->jkLog(env, env->l, JK_LOG_INFO,
  +                /* If epStat is NULL - no statistics will be collected, but the server
should still work.
  +                 */
  +                /*return JK_ERR; */
  +            } else {
  +                wEnv->epStat->structCnt=0;
  +                env->l->jkLog(env, env->l, JK_LOG_INFO,
                             "workerEnv.init() create slot %s\n",  shmName );
  +            }
           }
       }
   
  
  
  
  1.35      +9 -2      jakarta-tomcat-connectors/jk/native2/common/jk_shm.c
  
  Index: jk_shm.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_shm.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- jk_shm.c	9 Jun 2003 10:57:51 -0000	1.34
  +++ jk_shm.c	26 Oct 2003 19:16:22 -0000	1.35
  @@ -471,11 +471,18 @@
           /* XXX interprocess sync */
           slotId=shm->head->lastSlot++;
       }
  -    else
  +    else {
  +        env->l->jkLog(env, env->l, JK_LOG_ERROR, 
  +                      "shm.createSlot() no shared memory head\n");
           return NULL;
  +    }
       slot=shm->getSlot( env, shm, slotId );
   
  -    if( slot==NULL ) return NULL;
  +    if( slot==NULL ) {
  +        env->l->jkLog(env, env->l, JK_LOG_ERROR, 
  +                      "shm.createSlot() getSlot() returned NULL\n");
  +        return NULL;
  +    }
       
       env->l->jkLog(env, env->l, JK_LOG_INFO, 
                     "shm.createSlot() Create %d %#lx %#lx\n", slotId, shm->image, slot
);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message