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_jni.c
Date Wed, 10 Jul 2002 17:41:40 GMT
mturk       2002/07/10 10:41:40

  Modified:    jk/native2/common jk_worker_jni.c
  Log:
  Fix the reporting of stderr and stdout redirection and,
  calling it if the methods are not set in the config.
  
  Revision  Changes    Path
  1.25      +19 -17    jakarta-tomcat-connectors/jk/native2/common/jk_worker_jni.c
  
  Index: jk_worker_jni.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_jni.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- jk_worker_jni.c	5 Jul 2002 08:09:37 -0000	1.24
  +++ jk_worker_jni.c	10 Jul 2002 17:41:40 -0000	1.25
  @@ -120,7 +120,7 @@
           (*jniEnv)->GetStaticMethodID(jniEnv, p->jk_java_bridge_apri_class,
                                        "setOut", 
                                        "(Ljava/lang/String;)V");
  -    if(!p->jk_main_method) {
  +    if(!p->jk_setout_method) {
   	    env->l->jkLog(env, env->l, JK_LOG_EMERG, "Can't find AprImpl.setOut(String)");

   	    return JK_ERR;
       }
  @@ -129,7 +129,7 @@
           (*jniEnv)->GetStaticMethodID(jniEnv, p->jk_java_bridge_apri_class,
                                        "setErr", 
                                        "(Ljava/lang/String;)V");
  -    if(!p->jk_main_method) {
  +    if(!p->jk_seterr_method) {
   	    env->l->jkLog(env, env->l, JK_LOG_EMERG, "Can't find AprImpl.setErr(String)\n");

   	    return JK_ERR;
       }
  @@ -318,21 +318,23 @@
       }
       
       /* Set out and err stadard files */ 
  -
  -    env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                  "jni.init() setting stdout=%s...\n",jniWorker->stdout_name);
  -    (*jniEnv)->CallStaticVoidMethod(jniEnv,
  -                                    jniWorker->jk_java_bridge_apri_class,
  -                                    jniWorker->jk_setout_method,
  -                                    stdout_name);
  -
  -    env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                  "jni.init() setting stderr=%s...\n",jniWorker->stderr_name);
  -    (*jniEnv)->CallStaticVoidMethod(jniEnv,
  -                                    jniWorker->jk_java_bridge_apri_class,
  -                                    jniWorker->jk_seterr_method,
  -                                    stderr_name);
  -
  +    if (jniWorker->stdout_name && jniWorker->jk_setout_method) {
  +        env->l->jkLog(env, env->l, JK_LOG_INFO,
  +                      "jni.init() setting stdout=%s...\n",jniWorker->stdout_name);
  +        (*jniEnv)->CallStaticVoidMethod(jniEnv,
  +                                        jniWorker->jk_java_bridge_apri_class,
  +                                        jniWorker->jk_setout_method,
  +                                        stdout_name);
  +    }
  +    
  +    if (jniWorker->stderr_name && jniWorker->jk_seterr_method) {
  +        env->l->jkLog(env, env->l, JK_LOG_INFO,
  +                      "jni.init() setting stderr=%s...\n",jniWorker->stderr_name);
  +        (*jniEnv)->CallStaticVoidMethod(jniEnv,
  +                                        jniWorker->jk_java_bridge_apri_class,
  +                                        jniWorker->jk_seterr_method,
  +                                        stderr_name);
  +    }
       env->l->jkLog(env, env->l, JK_LOG_INFO,
                     "jni.init() calling main()...\n");
       (*jniEnv)->CallStaticVoidMethod(jniEnv,
  
  
  

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