tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/jni jk_jni_aprImpl.c
Date Wed, 10 Jul 2002 00:35:27 GMT
nacho       2002/07/09 17:35:27

  Modified:    jk/native2/jni jk_jni_aprImpl.c
  Log:
  Fixed some (Java?) leaks
  
  Revision  Changes    Path
  1.40      +11 -15    jakarta-tomcat-connectors/jk/native2/jni/jk_jni_aprImpl.c
  
  Index: jk_jni_aprImpl.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/jni/jk_jni_aprImpl.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- jk_jni_aprImpl.c	30 Jun 2002 09:57:38 -0000	1.39
  +++ jk_jni_aprImpl.c	10 Jul 2002 00:35:27 -0000	1.40
  @@ -313,15 +313,11 @@
               else if (strcmp(value, "done") == 0)
                  jk_jni_status_code = JNI_TOMCAT_STARTED;
           }
  -        return JK_OK;
  -    }
  -
  -    if( component->setAttribute ==NULL )
  -        return JK_OK;
  -
  -    if( component->setAttribute!=NULL ) {
  -        rc=component->setAttribute( env, component, name,
  -                                    component->pool->pstrdup( env, component->pool,
value ) );
  +    } else {
  +        if( component->setAttribute!=NULL ) {
  +            rc=component->setAttribute( env, component, name,
  +                                        component->pool->pstrdup( env, component->pool,
value ) );
  +        }
       }
   
       (*jniEnv)->ReleaseStringUTFChars(jniEnv, nameJ, name);
  @@ -379,12 +375,12 @@
       char *value;
       jstring valueJ=NULL;
       
  -    if( component->setAttribute ==NULL )
  -        return JK_OK;
  -    
  -    value=component->getAttribute( env, component, name );
  -    if( value!=NULL )
  -        valueJ=(*jniEnv)->NewStringUTF(jniEnv, value);
  +    if( component->getAttribute !=NULL ){   
  +        value=component->getAttribute( env, component, name );
  +        if( value!=NULL ) {
  +            valueJ=(*jniEnv)->NewStringUTF(jniEnv, value);
  +        }
  +    }
       
       (*jniEnv)->ReleaseStringUTFChars(jniEnv, nameJ, 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