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/native/common jk_jni_worker.c jk_sockbuf.c
Date Sat, 25 Aug 2001 01:05:00 GMT
costin      01/08/24 18:05:00

  Modified:    jk/native/common jk_jni_worker.c jk_sockbuf.c
  Log:
  Merge changes from 3.3.
  
  Revision  Changes    Path
  1.4       +16 -6     jakarta-tomcat-connectors/jk/native/common/jk_jni_worker.c
  
  Index: jk_jni_worker.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_jni_worker.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_jni_worker.c	2001/06/18 14:15:41	1.3
  +++ jk_jni_worker.c	2001/08/25 01:05:00	1.4
  @@ -59,7 +59,7 @@
    * Description: In process JNI worker                                      *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
    * Based on:                                                               *
  - * Version:     $Revision: 1.3 $                                           *
  + * Version:     $Revision: 1.4 $                                           *
    ***************************************************************************/
   
   #if !defined(WIN32) && !defined(NETWARE)
  @@ -91,9 +91,12 @@
   
   jint (JNICALL *jni_get_default_java_vm_init_args)(void *) = NULL;
   jint (JNICALL *jni_create_java_vm)(JavaVM **, JNIEnv **, void *) = NULL;
  +jint (JNICALL *jni_get_created_java_vms)(JavaVM **, int, int *) = NULL;
   
  -#define JAVA_BRIDGE_CLASS_NAME ("org/apache/tomcat/service/JNIEndpoint")
  - 
  +#define JAVA_BRIDGE_CLASS_NAME ("org/apache/tomcat/modules/server/JNIEndpoint")
  +/* #define JAVA_BRIDGE_CLASS_NAME ("org/apache/tomcat/service/JNIEndpoint")
  + */
  +
   static jk_worker_t *the_singleton_jni_worker = NULL;
   
   struct jni_worker {
  @@ -692,10 +695,16 @@
           (FARPROC)jni_create_java_vm = 
               GetProcAddress(hInst, "JNI_CreateJavaVM");
   
  +        (FARPROC)jni_get_created_java_vms = 
  +            GetProcAddress(hInst, "JNI_GetCreatedJavaVMs");
  +
           (FARPROC)jni_get_default_java_vm_init_args = 
               GetProcAddress(hInst, "JNI_GetDefaultJavaVMInitArgs");
  +
  +        jk_log(l, JK_LOG_DEBUG, 
  +               "Loaded all JNI procs\n");
   
  -        if(jni_create_java_vm && jni_get_default_java_vm_init_args) {
  +        if(jni_create_java_vm && jni_get_default_java_vm_init_args && jni_get_created_java_vms)
{
               return JK_TRUE;
           }
   
  @@ -715,9 +724,10 @@
       }
       if (0 != javaNlmHandle) {
           jni_create_java_vm = ImportSymbol(GetNLMHandle(), "JNI_CreateJavaVM");
  +        jni_get_created_java_vms = ImportSymbol(GetNLMHandle(), "JNI_GetCreatedJavaVMs");
           jni_get_default_java_vm_init_args = ImportSymbol(GetNLMHandle(), "JNI_GetDefaultJavaVMInitArgs");
       }
  -    if(jni_create_java_vm && jni_get_default_java_vm_init_args) {
  +    if(jni_create_java_vm && jni_get_default_java_vm_init_args && jni_get_created_java_vms)
{
           return JK_TRUE;
       }
   #else 
  @@ -729,7 +739,7 @@
   
       if(!handle) {
           jk_log(l, JK_LOG_EMERG, 
  -               "Can't log native library %s : %s\n", p->jvm_dll_path,
  +               "Can't load native library %s : %s\n", p->jvm_dll_path,
                  dlerror());
       } else {
           jni_create_java_vm = dlsym(handle, "JNI_CreateJavaVM");
  
  
  
  1.4       +2 -2      jakarta-tomcat-connectors/jk/native/common/jk_sockbuf.c
  
  Index: jk_sockbuf.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_sockbuf.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_sockbuf.c	2001/06/18 14:16:06	1.3
  +++ jk_sockbuf.c	2001/08/25 01:05:00	1.4
  @@ -58,7 +58,7 @@
   /***************************************************************************
    * Description: Simple buffer object to handle buffered socket IO          *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
  - * Version:     $Revision: 1.3 $                                           *
  + * Version:     $Revision: 1.4 $                                           *
    ***************************************************************************/
   
   #include "jk_global.h"
  @@ -69,7 +69,7 @@
   int jk_sb_open(jk_sockbuf_t *sb,
                  int sd)
   {
  -    if(sb && sd > 0) {
  +    if(sb && sd >= 0) {
           sb->end   = 0;
           sb->start = 0;
           sb->sd    = sd;
  
  
  

Mime
View raw message