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_workerEnv.c
Date Tue, 04 Dec 2001 19:10:04 GMT
costin      01/12/04 11:10:04

  Modified:    jk/native2/common jk_workerEnv.c
  Log:
  Updates.
  
  Revision  Changes    Path
  1.3       +25 -6     jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c
  
  Index: jk_workerEnv.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_workerEnv.c	2001/12/02 01:04:51	1.2
  +++ jk_workerEnv.c	2001/12/04 19:10:04	1.3
  @@ -59,15 +59,35 @@
    * Description: Workers controller                                         *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
    * Author:      Henri Gomez <hgomez@slib.fr>                               *
  - * Version:     $Revision: 1.2 $                                           *
  + * Version:     $Revision: 1.3 $                                           *
    ***************************************************************************/
   
   #include "jk_workerEnv.h" 
   #include "jk_env.h"
   #include "jk_worker.h"
  -#include "jk_util.h"
   
  +#define DEFAULT_WORKER              ("ajp13")
   
  +int jk_get_worker_list(jk_map_t *m,
  +                       char ***list,
  +                       unsigned *num_of_wokers)
  +{
  +    if(m && list && num_of_wokers) {
  +        char **ar = map_get_string_list(m, 
  +                                        "worker.list", 
  +                                        num_of_wokers, 
  +                                        DEFAULT_WORKER );
  +        if(ar)  {
  +            *list = ar;     
  +            return JK_TRUE;
  +        }
  +        *list = NULL;   
  +        *num_of_wokers = 0;
  +    }
  +
  +    return JK_FALSE;
  +}
  +
   /**
    *  Init the workers, prepare the we.
    * 
  @@ -95,7 +115,6 @@
           const char *name=(const char*)worker_list[i];
   
           w=_this->createWorker(_this, name, init_data);
  -        w->channel=NULL;
           if( w==NULL ) {
               l->jkLog(_this->l, JK_LOG_ERROR,
                      "init failed to create worker %s\n", 
  @@ -103,8 +122,8 @@
               /* Ignore it, other workers may be ok.
                  return JK_FALSE; */
            } else {
  -            map_put(_this->worker_map, worker_list[i], w, (void *)&oldw);
  -        
  +             map_put(_this->worker_map, worker_list[i], w, (void *)&oldw);
  +            
               if(oldw!=NULL) {
                   l->jkLog(_this->l, JK_LOG_DEBUG, 
                          "build_worker_map, removing old %s worker \n",
  @@ -186,7 +205,7 @@
           l->jkLog(l, JK_LOG_ERROR,
                  "workerEnv.createWorker(): factory can't create worker %s:%s\n",
                  type, name); 
  -        return JK_FALSE;
  +        return NULL;
       }
   
       w->name=(char *)name;
  
  
  

--
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