cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_channel.h jk_workerEnv.h jk_worker.h

2003-10-16 Thread hgomez
hgomez  2003/10/16 00:51:48

  Modified:jk/native2/common jk_handler_logon.c jk_channel_un.c
jk_mutex.c jk_channel_apr_socket.c
jk_channel_socket.c jk_handler_response.c
jk_channel_jni.c jk_channel.c jk_worker_ajp13.c
   jk/native2/include jk_channel.h jk_workerEnv.h jk_worker.h
  Log:
  Start to port back jk cping/cpong
  
  Revision  ChangesPath
  1.22  +3 -3  jakarta-tomcat-connectors/jk/native2/common/jk_handler_logon.c
  
  Index: jk_handler_logon.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_handler_logon.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- jk_handler_logon.c25 Sep 2003 15:23:23 -  1.21
  +++ jk_handler_logon.c16 Oct 2003 07:51:48 -  1.22
  @@ -179,7 +179,7 @@
   
   if (nego == 0x) {
   env-l-jkLog(env, env-l, JK_LOG_ERROR,
  -  handler.log_ok()  can't get negociated data\n);
  +  handler.logok()  can't get negociated data\n);
   return JK_HANDLER_FATAL;
   }
   
  @@ -187,7 +187,7 @@
   
   if (! sname) {
   env-l-jkLog(env, env-l, JK_LOG_ERROR,
  -  handler.logon() Error getting servlet engine name\n);
  +  handler.logok() Error getting servlet engine name\n);
   return JK_HANDLER_FATAL;
   }
   
  
  
  
  1.17  +17 -0 jakarta-tomcat-connectors/jk/native2/common/jk_channel_un.c
  
  Index: jk_channel_un.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_un.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- jk_channel_un.c   4 Mar 2003 23:56:37 -   1.16
  +++ jk_channel_un.c   16 Oct 2003 07:51:48 -  1.17
  @@ -238,6 +238,22 @@
   return rc;
   }
   
  +
  +/*
  + * Wait input event on socket for timeout ms
  + */
  +static int JK_METHOD jk2_channel_un_hasinput(jk_env_t *env,
  + jk_channel_t *ch,
  + jk_endpoint_t *endpoint,
  +  
int timeout)
  +
  +{
  + /*
  +  * Should implements the select/poll for UN here
  +  */
  + return (JK_TRUE) ;
  +}
  +
   /** connect to Tomcat (jk_open_socket)
*/
   static int JK_METHOD jk2_channel_un_open(jk_env_t *env,
  @@ -490,6 +506,7 @@
   ch-send= jk2_channel_un_send; 
   ch-open= jk2_channel_un_open; 
   ch-close= jk2_channel_un_close; 
  +ch-hasinput= jk2_channel_un_hasinput; 
   ch-is_stream=JK_TRUE;
   ch-serverSide=JK_FALSE;
   
  
  
  
  1.6   +3 -3  jakarta-tomcat-connectors/jk/native2/common/jk_mutex.c
  
  Index: jk_mutex.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_mutex.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_mutex.c4 Feb 2003 07:39:58 -   1.5
  +++ jk_mutex.c16 Oct 2003 07:51:48 -  1.6
  @@ -83,17 +83,17 @@
   switch( code ) {
   case MUTEX_LOCK: {
   if( mutex-mbean-debug  0 )
  -env-l-jkLog(env, env-l, JK_LOG_DEBUG, mutex.open()\n);
  +env-l-jkLog(env, env-l, JK_LOG_DEBUG, mutex.lock()\n);
   return mutex-lock(env, mutex);
   }
   case MUTEX_TRYLOCK: {
   if( mutex-mbean-debug  0 )
  -env-l-jkLog(env, env-l, JK_LOG_DEBUG, mutex.close()\n);
  +env-l-jkLog(env, env-l, JK_LOG_DEBUG, mutex.trylock()\n);
   return mutex-tryLock(env, mutex);
   }
   case MUTEX_UNLOCK: {
   if( mutex-mbean-debug  0 )
  -env-l-jkLog(env, env-l, JK_LOG_DEBUG, mutex.recv()\n);
  +env-l-jkLog(env, env-l, JK_LOG_DEBUG, mutex.unlock()\n);
   return mutex-unLock(env, mutex);
   }
   }/* switch */
  
  
  
  1.32  +61 -1 
jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c
  
  Index: jk_channel_apr_socket.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- jk_channel_apr_socket.c   30 Sep 2003 13:42:02 -  1.31
  +++ jk_channel_apr_socket.c   16 Oct 2003 07:51:48 -  1.32
  @@ -91,6 +91,7 @@
   short port;
   int keepalive;
   int timeout;
  +int 
   };
   
   typedef struct jk_channel_apr_private jk_channel_apr_private_t;
  @@ -111,6 +112,11 @@
 

RE: cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_channel.h jk_workerEnv.h jk_worker.h

2003-10-16 Thread Mladen Turk


 -Original Message-
 From: [EMAIL PROTECTED]
   
   1.17  +17 -0 
 jakarta-tomcat-connectors/jk/native2/common/jk_channel_un.c
   
   
   1.6   +3 -3  
 jakarta-tomcat-connectors/jk/native2/common/jk_mutex.c
   
   
   1.57  +34 -1 
 jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c

Henri,

IMO all of those should be deprecated.

Instead of jk_mutex use the apr_anylock, or apr_thread_mutex cause it's
meant for thread locking, not as interposes mutex.
and remove the channel_un and channel_socket.

MT.




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



Re: cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_channel.h jk_workerEnv.h jk_worker.h

2003-10-16 Thread Henri Gomez
Mladen Turk a écrit :


-Original Message-
From: [EMAIL PROTECTED]
 
 1.17  +17 -0 
jakarta-tomcat-connectors/jk/native2/common/jk_channel_un.c
 
 
 1.6   +3 -3  
jakarta-tomcat-connectors/jk/native2/common/jk_mutex.c
 
 
 1.57  +34 -1 
jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c


Henri,

IMO all of those should be deprecated.

Instead of jk_mutex use the apr_anylock, or apr_thread_mutex cause it's
meant for thread locking, not as interposes mutex.
and remove the channel_un and channel_socket.
Ok for jk_mutex and channel_socket but we should keep channel_un which
is requested by many people.
In fact it's one of the features of jk2 would convince some admins to
use jk2 in favor of jk ;)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]