costin 2002/06/10 17:01:16 Modified: jk/native2/jni jk_jni_aprImpl.c Log: Fix the POST in in-process mode. The 'response' from a jni invocation is in the same buffer, but we must call msg->end() to update the message size. The dispatch mechanism is no longer used ( or it shouldn't ), I'll do a grep and clean the code. ( invoke is much cleaner ). Revision Changes Path 1.35 +13 -6 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.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- jk_jni_aprImpl.c 10 Jun 2002 21:49:53 -0000 1.34 +++ jk_jni_aprImpl.c 11 Jun 2002 00:01:16 -0000 1.35 @@ -603,8 +603,10 @@ "jkInvoke() invoke %#lx \n", bean->invoke ); rc=bean->invoke( env, bean, ep, code, ep->reply, raw ); } else { - /* Backward compat for AJP13 messages, where the code is used to + /* NOT USED. Backward compat for AJP13 messages, where the code is used to locate a handler. Deprecated, use the invoke() method ! */ + env->l->jkLog(env, env->l, JK_LOG_INFO, + "jkInvoke() component dispatch2 %d %d %#lx\n", rc, code, bean->invoke); rc=workerEnv->dispatch( env, workerEnv, target, ep, code, ep->reply ); } @@ -612,6 +614,10 @@ if( arrayAccessMethod == JK_GET_BYTE_ARRAY_ELEMENTS ) { if( rc == JK_INVOKE_WITH_RESPONSE ) { + /* env->l->jkLog(env, env->l, JK_LOG_INFO, */ + /* "jkInvoke() release byte array elements %d %d %#lx\n", */ + /* ep->reply->pos, ep->reply->len , ep->reply->buf ); */ + ep->reply->end( env, ep->reply ); (*jniEnv)->ReleaseByteArrayElements(jniEnv, data, nbuf, JNI_ABORT ); rc=JK_OK; } else { @@ -620,9 +626,12 @@ ep->reply->buf=oldBuf; } else if ( arrayAccessMethod == JK_GET_REGION ) { if( rc == JK_INVOKE_WITH_RESPONSE ) { - /* env->l->jkLog(env, env->l, JK_LOG_INFO, */ - /* "jkInvoke() release %d %d %#lx\n", */ - /* ep->reply->pos, ep->reply->len , ep->reply->buf ); */ + + /*env->l->jkLog(env, env->l, JK_LOG_INFO, */ + /* "jkInvoke() release %d %d %#lx\n", */ + /* ep->reply->pos, ep->reply->len , ep->reply->buf ); */ + ep->reply->end( env, ep->reply ); + (*jniEnv)->SetByteArrayRegion( jniEnv, data, 0, ep->reply->len + 4 , (jbyte *)ep->reply->buf ); rc=JK_OK; } @@ -636,8 +645,6 @@ (*jniEnv)->ExceptionClear( jniEnv ) */ } - /* env->l->jkLog(env, env->l, JK_LOG_INFO, "jkInvoke() done\n"); */ - return rc; }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>