costin      02/04/25 12:25:11

  Modified:    jk/native2/server/apache13 jk_service_apache13.c mod_jk2.c
               jk/native2/server/apache2 jk_logger_apache2.c
                        jk_map_aprtable.c jk_service_apache2.c mod_jk2.c
               jk/native2/server/isapi jk_service_iis.c
  Log:
  Update rc.
  
  Revision  Changes    Path
  1.4       +12 -12    
jakarta-tomcat-connectors/jk/native2/server/apache13/jk_service_apache13.c
  
  Index: jk_service_apache13.c
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache13/jk_service_apache13.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_service_apache13.c     24 Mar 2002 19:22:19 -0000      1.3
  +++ jk_service_apache13.c     25 Apr 2002 19:25:10 -0000      1.4
  @@ -92,7 +92,7 @@
       jk_map_t *headers;
       
       if(s==NULL ||  s->ws_private==NULL )
  -        return JK_FALSE;
  +        return JK_ERR;
       
       r = (request_rec *)s->ws_private;  
           
  @@ -149,7 +149,7 @@
       /* ap_send_http_header(r); */
       s->response_started = JK_TRUE;
       
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   /*
  @@ -179,10 +179,10 @@
               } else {
                   *actually_read = (unsigned) rv;
               }
  -            return JK_TRUE;
  +            return JK_OK;
           }
       }
  -    return JK_FALSE;
  +    return JK_ERR;
   }
   
   /*
  @@ -217,7 +217,7 @@
                   env->l->jkLog(env, env->l, JK_LOG_INFO, 
                                 "service.write() default head\n");
                   if(!s->head(env, s)) {
  -                    return JK_FALSE;
  +                    return JK_ERR;
                   }
                   {
                       array_header *t = ap_table_elts(rr->headers_out);
  @@ -244,7 +244,7 @@
                   bb+=CHUNK_SIZE;
                   
                   if(toSend != r) { 
  -                    return JK_FALSE; 
  +                    return JK_ERR; 
                   } 
                   
               }
  @@ -254,9 +254,9 @@
                */
               ap_bflush(s->ws_private);
           }
  -        return JK_TRUE;
  +        return JK_OK;
       }
  -    return JK_FALSE;
  +    return JK_ERR;
   }
   
   /* ========================================================================= */
  @@ -364,7 +364,7 @@
           break;
   
           default :
  -            return JK_FALSE;
  +            return JK_ERR;
       }
   
       s->is_ssl       = JK_FALSE;
  @@ -450,7 +450,7 @@
   
       jk2_map_default_create(env, &s->headers_out, s->pool );
   
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   /*
  @@ -484,7 +484,7 @@
   int jk2_service_apache13_init(jk_env_t *env, jk_ws_service_t *s)
   {
       if(s==NULL ) {
  -        return JK_FALSE;
  +        return JK_ERR;
       }
   
       s->head   = jk2_service_apache13_head;
  @@ -493,5 +493,5 @@
       s->init   = jk2_init_ws_service;
       s->afterRequest     = jk2_service_apache13_afterRequest;
       
  -    return JK_TRUE;
  +    return JK_OK;
   }
  
  
  
  1.10      +15 -8     jakarta-tomcat-connectors/jk/native2/server/apache13/mod_jk2.c
  
  Index: mod_jk2.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache13/mod_jk2.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- mod_jk2.c 9 Apr 2002 21:00:38 -0000       1.9
  +++ mod_jk2.c 25 Apr 2002 19:25:11 -0000      1.10
  @@ -59,7 +59,7 @@
    * Description: Apache 1.3 plugin for Jakarta/Tomcat                         *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
    *                 Henri Gomez <[EMAIL PROTECTED]>                               *
  - * Version:     $Revision: 1.9 $                                           *
  + * Version:     $Revision: 1.10 $                                           *
    ***************************************************************************/
   
   /*
  @@ -123,7 +123,7 @@
       int rc;
       
       rc=workerEnv->config->setPropertyString( env, workerEnv->config, name, value );
  -    if( rc!=JK_TRUE ) {
  +    if( rc!=JK_OK ) {
           fprintf( stderr, "mod_jk2: Unrecognized option %s %s\n", name, value);
       }
   
  @@ -158,19 +158,26 @@
          to a file. Check the logger for default settings.
       */
       jkb=env->createBean2( env, env->globalPool, "logger.file", "");
  -    l = jkb->object;
  +    if( jkb==NULL ) {
  +        fprintf(stderr, "Error creating logger ");
  +        return JK_ERR;
  +    }
       env->l=l;
       env->alias( env, "logger.file:", "logger");
       
       /* Create the workerEnv
        */
       jkb=env->createBean2( env, env->globalPool,"workerEnv", "");
  +    if( jkb==NULL ) {
  +        fprintf(stderr, "Error creating workerEnv ");
  +        return JK_ERR;
  +    }
       workerEnv= jkb->object;
       env->alias( env, "workerEnv:", "workerEnv");
   
       if( workerEnv==NULL || l== NULL  ) {
           fprintf( stderr, "Error initializing jk, NULL objects \n");
  -        return JK_FALSE;
  +        return JK_ERR;
       }
   
       /* Local initialization.
  @@ -181,7 +188,7 @@
        */
       workerEnv->initData->add( env, workerEnv->initData, "serverRoot",
                                 ap_server_root_relative(p,""));
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   
  @@ -257,7 +264,7 @@
   
       ap_pool *gPool=NULL;
       void *data=NULL;
  -    int rc=JK_TRUE;
  +    int rc=JK_OK;
   
       env->l->jkLog(env, env->l, JK_LOG_INFO, "mod_jk child init\n" );
       
  @@ -376,14 +383,14 @@
           rPool->reset(env, rPool);
           
           rc1=worker->rPoolCache->put( env, worker->rPoolCache, rPool );
  -        if( rc1 == JK_TRUE ) {
  +        if( rc1 == JK_OK ) {
               rPool=NULL;
           } else {
               rPool->close(env, rPool);
           }
       }
   
  -    if(rc==JK_TRUE) {
  +    if(rc==JK_OK) {
           workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
           return OK;    /* NOT r->status, even if it has changed. */
       }
  
  
  
  1.20      +7 -7      
jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c
  
  Index: jk_logger_apache2.c
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- jk_logger_apache2.c       20 Apr 2002 22:57:16 -0000      1.19
  +++ jk_logger_apache2.c       25 Apr 2002 19:25:11 -0000      1.20
  @@ -92,18 +92,18 @@
                                    int level,
                                    const char *what)
   {
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   
   static int JK_METHOD jk2_logger_apache2_init(jk_env_t *env, jk_logger_t *_this)
   {
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   static int JK_METHOD jk2_logger_apache2_close(jk_env_t *env, jk_logger_t *_this)
   {
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   static int JK_METHOD jk2_logger_apache2_jkVLog(jk_env_t *env, jk_logger_t *l,
  @@ -128,10 +128,10 @@
   #endif
   
       if( level < l->level )
  -        return JK_TRUE;
  +        return JK_OK;
   
       if( s==NULL ) {
  -        return JK_FALSE;
  +        return JK_ERR;
       }
       
   #if defined(NETWARE) /* until we get a vsnprintf function */
  @@ -204,7 +204,7 @@
                                                    sizeof(jk_logger_t));
   
       if(l==NULL ) {
  -        return JK_FALSE;
  +        return JK_ERR;
       }
       
       l->log = jk2_logger_apache2_log;
  @@ -219,6 +219,6 @@
       l->mbean=result;
       result->setAttribute = jk2_logger_file_setProperty;
   
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
  
  
  
  1.9       +3 -3      
jakarta-tomcat-connectors/jk/native2/server/apache2/jk_map_aprtable.c
  
  Index: jk_map_aprtable.c
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_map_aprtable.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jk_map_aprtable.c 23 Mar 2002 17:15:08 -0000      1.8
  +++ jk_map_aprtable.c 25 Apr 2002 19:25:11 -0000      1.9
  @@ -92,7 +92,7 @@
       
       apr_table_setn( aprMap, name, (char *)value );
       
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   static int jk2_map_aprtable_add( struct jk_env *env, struct jk_map *_this,
  @@ -102,7 +102,7 @@
       
       apr_table_addn( aprMap, name, (char *)value );
       
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   static int jk2_map_aprtable_size( struct jk_env *env, struct jk_map *_this )
  @@ -165,7 +165,7 @@
       _this->init=jk2_map_aprtable_init;
       _this->clear=jk2_map_aprtable_clear;
       
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   
  
  
  
  1.17      +16 -16    
jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c
  
  Index: jk_service_apache2.c
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- jk_service_apache2.c      24 Apr 2002 23:12:50 -0000      1.16
  +++ jk_service_apache2.c      25 Apr 2002 19:25:11 -0000      1.17
  @@ -59,7 +59,7 @@
    * Description: Apache 2 plugin for Jakarta/Tomcat                         
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           
    *                 Henri Gomez <[EMAIL PROTECTED]>                            
  - * Version:     $Revision: 1.16 $                                           
  + * Version:     $Revision: 1.17 $                                           
    */
   
   #include "apu_compat.h"
  @@ -104,7 +104,7 @@
       jk_map_t *headers;
       
       if(s==NULL ||  s->ws_private==NULL )
  -        return JK_FALSE;
  +        return JK_ERR;
       
       r = (request_rec *)s->ws_private;  
           
  @@ -187,7 +187,7 @@
       /* ap_send_http_header(r); */
       s->response_started = JK_TRUE;
       
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   /*
  @@ -217,10 +217,10 @@
               } else {
                   *actually_read = (unsigned) rv;
               }
  -            return JK_TRUE;
  +            return JK_OK;
           }
       }
  -    return JK_FALSE;
  +    return JK_ERR;
   }
   
   /*
  @@ -254,8 +254,8 @@
               if(!s->response_started) {
                   env->l->jkLog(env, env->l, JK_LOG_INFO, 
                                 "service.write() default head\n");
  -                if(!s->head(env, s)) {
  -                    return JK_FALSE;
  +                if(s->head(env, s) != JK_OK) {
  +                    return JK_ERR;
                   }
   
                   {
  @@ -283,7 +283,7 @@
                   bb+=CHUNK_SIZE;
                   
                   if(toSend != r) { 
  -                    return JK_FALSE; 
  +                    return JK_ERR; 
                   } 
                   
               }
  @@ -294,14 +294,14 @@
               if(ap_rflush(s->ws_private) != APR_SUCCESS) {
                   ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, 
                                NULL, "mod_jk: Error flushing \n"  );
  -                return JK_FALSE;
  +                return JK_ERR;
               }
   
           }
           
  -        return JK_TRUE;
  +        return JK_OK;
       }
  -    return JK_FALSE;
  +    return JK_ERR;
   }
   
   /* ========================================================================= */
  @@ -358,7 +358,7 @@
   
       /* get server name */
       s->server_name= (char *)(r->hostname ? r->hostname :
  -                 r->server->server_hostname);
  +                             r->server->server_hostname);
   
       /* get the real port (otherwise redirect failed) */
       apr_sockaddr_port_get(&port,r->connection->local_addr);
  @@ -410,7 +410,7 @@
           break;
   
           default :
  -            return JK_FALSE;
  +            return JK_ERR;
       }
   
       s->is_ssl       = JK_FALSE;
  @@ -521,7 +521,7 @@
       jk2_map_default_create(env, &s->headers_out, s->pool );
   #endif
   
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   /*
  @@ -555,7 +555,7 @@
   int jk2_service_apache2_init(jk_env_t *env, jk_ws_service_t *s)
   {
       if(s==NULL ) {
  -        return JK_FALSE;
  +        return JK_ERR;
       }
   
       s->head   = jk2_service_apache2_head;
  @@ -564,5 +564,5 @@
       s->init   = jk2_init_ws_service;
       s->afterRequest     = jk2_service_apache2_afterRequest;
       
  -    return JK_TRUE;
  +    return JK_OK;
   }
  
  
  
  1.13      +12 -12    jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c
  
  Index: mod_jk2.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_jk2.c 19 Apr 2002 22:30:46 -0000      1.12
  +++ mod_jk2.c 25 Apr 2002 19:25:11 -0000      1.13
  @@ -59,7 +59,7 @@
    * Description: Apache 2 plugin for Jakarta/Tomcat                         *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
    *                 Henri Gomez <[EMAIL PROTECTED]>                               *
  - * Version:     $Revision: 1.12 $                                           *
  + * Version:     $Revision: 1.13 $                                           *
    ***************************************************************************/
   
   /*
  @@ -151,8 +151,8 @@
       jk_env_t *env=workerEnv->globalEnv;
       int rc;
       
  -    rc=workerEnv->config->setPropertyString( env, workerEnv->config, name, value );
  -    if( rc!=JK_TRUE ) {
  +    rc=workerEnv->config->setPropertyString( env, workerEnv->config, (char *)name, 
value );
  +    if( rc!=JK_OK ) {
           fprintf( stderr, "mod_jk2: Unrecognized option %s %s\n", name, value);
       }
   
  @@ -188,7 +188,7 @@
   {
       jk_uriEnv_t *uriEnv=(jk_uriEnv_t *)per_dir;
   
  -    uriEnv->mbean->setAttribute( workerEnv->globalEnv, uriEnv->mbean, name, val );
  +    uriEnv->mbean->setAttribute( workerEnv->globalEnv, uriEnv->mbean, (char *)name, 
(void *)val );
       
       fprintf(stderr, "JkUriSet  %s %s dir=%s args=%s\n",
               uriEnv->workerName, cmd->path,
  @@ -276,7 +276,7 @@
       env->alias( env, "logger.file:", "logger");
       l = jkb->object;
   #else
  -    env->registerFactory( env, "logger.apache2",    jk2_logger_apache2_factory );
  +    env->registerFactory( env, "logger.apache2",  jk2_logger_apache2_factory );
       jkb=env->createBean2( env, env->globalPool, "logger.apache2", "");
       env->alias( env, "logger.apache2:", "logger");
       l = jkb->object;
  @@ -397,7 +397,7 @@
       if( tmpPool != NULL ) {
           /* We can't detect the root pool */
           /* fprintf(stderr, "XXX Can't find root pool\n" ); */
  -        return JK_FALSE;
  +        return JK_ERR;
       }
       if(mainPool != NULL )
           *mainPool=gPool;
  @@ -405,9 +405,9 @@
       /* We have a global pool ! */
       apr_pool_userdata_get( &data, "mod_jk_init", gPool );
       if( data==NULL ) {
  -        return JK_TRUE;
  +        return JK_OK;
       } else {
  -        return JK_FALSE;
  +        return JK_ERR;
       }
   }
   
  @@ -428,7 +428,7 @@
       
       rc=jk2_apache2_isValidating( plog, &gPool );
   
  -    if( rc == JK_TRUE && gPool != NULL ) {
  +    if( rc == JK_OK && gPool != NULL ) {
           /* This is the first step */
           env->l->jkLog(env, env->l, JK_LOG_ERROR,
                         "mod_jk.post_config() first invocation\n");
  @@ -441,7 +441,7 @@
   
   
   /*     if(!workerEnv->was_initialized) { */
  -/*         workerEnv->was_initialized = JK_TRUE;         */
  +/*         workerEnv->was_initialized = JK_OK;         */
           
   /*         jk2_init( env, pconf, workerEnv, s ); */
   /*     } */
  @@ -574,7 +574,7 @@
           rPool->reset(env, rPool);
           
           rc1=worker->rPoolCache->put( env, worker->rPoolCache, rPool );
  -        if( rc1 == JK_TRUE ) {
  +        if( rc1 == JK_OK ) {
               rPool=NULL;
           }
           if( rPool!=NULL ) {
  @@ -582,7 +582,7 @@
           }
       }
   
  -    if(rc==JK_TRUE) {
  +    if(rc==JK_OK) {
           workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
           return OK;    /* NOT r->status, even if it has changed. */
       }
  
  
  
  1.10      +19 -19    
jakarta-tomcat-connectors/jk/native2/server/isapi/jk_service_iis.c
  
  Index: jk_service_iis.c
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/jk_service_iis.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jk_service_iis.c  20 Apr 2002 03:06:18 -0000      1.9
  +++ jk_service_iis.c  25 Apr 2002 19:25:11 -0000      1.10
  @@ -95,17 +95,17 @@
       if (s->status< 100 || s->status > 1000) {
           env->l->jkLog(env,env->l, JK_LOG_ERROR, 
                  "jk_ws_service_t::jk2_service_iis_head, invalid status %d\n", 
s->status);
  -        return JK_FALSE;
  +        return JK_ERR;
       }
       
       if (!s->response_started) {
  -        return JK_TRUE;
  +        return JK_OK;
       }
   
       if( lpEcb == NULL ) {
           env->l->jkLog(env,env->l, JK_LOG_ERROR, 
                         "jk_ws_service_t::start_response, no lpEcp\n");
  -        return JK_FALSE;
  +        return JK_ERR;
       }
       
       s->response_started = JK_TRUE;
  @@ -158,10 +158,10 @@
                                         (LPDWORD)headers_str)) {
           env->l->jkLog(env, env->l, JK_LOG_ERROR, 
                         "jk_ws_service_t::start_response, ServerSupportFunction 
failed\n");
  -        return JK_FALSE;
  +        return JK_ERR;
       }       
       
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   static int JK_METHOD jk2_service_iis_read(jk_env_t *env, jk_ws_service_t *s,
  @@ -203,16 +203,16 @@
                   } else {
                       env->l->jkLog(env,env->l, JK_LOG_ERROR, 
                              "jk_ws_service_t::read, ReadClient failed\n");
  -                    return JK_FALSE;
  +                    return JK_ERR;
                   }                   
               }
           }
  -        return JK_TRUE;
  +        return JK_OK;
       }
       
       env->l->jkLog(env, env->l, JK_LOG_ERROR, 
                     "jk_ws_service_t::read, NULL parameters\n");
  -    return JK_FALSE;
  +    return JK_ERR;
   }
   
   static int JK_METHOD jk2_service_iis_write(jk_env_t *env, jk_ws_service_t *s,
  @@ -240,20 +240,20 @@
                                           0)) {
                       env->l->jkLog(env, env->l, JK_LOG_ERROR, 
                              "jk_ws_service_t::write, WriteClient failed\n");
  -                    return JK_FALSE;
  +                    return JK_ERR;
                   }
                   written += try_to_write;
               }
           }
           
  -        return JK_TRUE;
  +        return JK_OK;
           
       }
       
       env->l->jkLog(env, env->l, JK_LOG_ERROR, 
              "jk_ws_service_t::write, NULL parameters\n");
       
  -    return JK_FALSE;
  +    return JK_ERR;
   }
   
   int get_server_value(struct jk_env *env, LPEXTENSION_CONTROL_BLOCK lpEcb,
  @@ -267,7 +267,7 @@
                                    buf,
                                    (LPDWORD)&bufsz)) {
           strcpy(buf, def_val);
  -        return JK_FALSE;
  +        return JK_ERR;
       }
   
       if (bufsz > 0) {
  @@ -276,7 +276,7 @@
       env->l->jkLog(env,env->l, JK_LOG_ERROR, 
              "jk_ws_service_t::write, NULL parameters\n");
   
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   
  @@ -299,7 +299,7 @@
           /* *worker_name    = DEFAULT_WORKER_NAME; */
           GET_SERVER_VARIABLE_VALUE(w->pool,"URL", s->req_uri);       
           if (jk_requtil_unescapeUrl(s->req_uri) < 0)
  -            return JK_FALSE;
  +            return JK_ERR;
           jk_requtil_getParents(s->req_uri);
       }
       
  @@ -491,13 +491,13 @@
               }
           } else {
               /* We must have our two headers */
  -            return JK_FALSE;
  +            return JK_ERR;
           }
       } else {
  -        return JK_FALSE;
  +        return JK_ERR;
       }
       
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
   static void JK_METHOD jk2_service_iis_afterRequest(jk_env_t *env, jk_ws_service_t 
*s )
  @@ -523,7 +523,7 @@
   int jk2_service_iis_init(jk_env_t *env, jk_ws_service_t *s)
   {
       if(s==NULL ) {
  -        return JK_FALSE;
  +        return JK_ERR;
       }
       
       s->head   = jk2_service_iis_head;
  @@ -532,6 +532,6 @@
       s->init   = jk2_service_iis_initService;
       s->afterRequest = jk2_service_iis_afterRequest;
       
  -    return JK_TRUE;
  +    return JK_OK;
   }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to