tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_ajp13.c
Date Tue, 15 Oct 2002 09:38:30 GMT
mturk       2002/10/15 02:38:29

  Modified:    jk/native2/common jk_worker_ajp13.c
  Log:
  Fix group (lb) processing for channels, allowing the lb:name syntax.
  This prevents making lb:lb:name for such situations.
  
  Revision  Changes    Path
  1.40      +30 -11    jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c
  
  Index: jk_worker_ajp13.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- jk_worker_ajp13.c	4 Oct 2002 20:29:19 -0000	1.39
  +++ jk_worker_ajp13.c	15 Oct 2002 09:38:29 -0000	1.40
  @@ -740,19 +740,38 @@
                   env->l->jkLog(env, env->l, JK_LOG_DEBUG,
                                 "ajp13.init(): Adding %s to %s\n",
                                 ajp13->mbean->localName, name);
  -            lb= env->getByName2( env, "lb", name );
  -            if( lb==NULL ) {
  -                /* Create the lb group */
  -                if( ajp13->mbean->debug > 0 ) 
  -                    env->l->jkLog(env, env->l, JK_LOG_DEBUG,
  -                                  "ajp13.init(): Automatically creating the group %s\n",
  -                                  name);
  -                env->createBean2( env, ajp13->workerEnv->mbean->pool, "lb",
name );
  +            if (strncmp(name, "lb:", 3) == 0) {
  +                lb= env->getByName( env, name );
  +                if( lb==NULL ) {
  +                    /* Create the lb group */
  +                    if( ajp13->mbean->debug > 0 ) 
  +                        env->l->jkLog(env, env->l, JK_LOG_DEBUG,
  +                                      "ajp13.init(): Automatically creating the group %s\n",
  +                                      name);
  +                    env->createBean( env, ajp13->workerEnv->mbean->pool, name
);
  +                    lb= env->getByName( env, name );
  +                    if( lb==NULL ) {
  +                        env->l->jkLog(env, env->l, JK_LOG_ERROR,
  +                                      "ajp13.init(): Failed to create %s\n", name);
  +                        return JK_ERR;
  +                    }
  +                }
  +            }
  +            else {
                   lb= env->getByName2( env, "lb", name );
                   if( lb==NULL ) {
  -                    env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                                  "ajp13.init(): Failed to create %s\n", name);
  -                    return JK_ERR;
  +                    /* Create the lb group */
  +                    if( ajp13->mbean->debug > 0 ) 
  +                        env->l->jkLog(env, env->l, JK_LOG_DEBUG,
  +                                      "ajp13.init(): Automatically creating the group %s\n",
  +                                      name);
  +                    env->createBean2( env, ajp13->workerEnv->mbean->pool, "lb",
name );
  +                    lb= env->getByName2( env, "lb", name );
  +                    if( lb==NULL ) {
  +                        env->l->jkLog(env, env->l, JK_LOG_ERROR,
  +                                      "ajp13.init(): Failed to create %s\n", name);
  +                        return JK_ERR;
  +                    }
                   }
               }
               lb->mbean->setAttribute(env, lb->mbean, "worker",
  
  
  

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


Mime
View raw message