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_ajp_common.c
Date Fri, 10 May 2002 23:58:40 GMT
costin      02/05/10 16:58:40

  Modified:    jk/native/common jk_ajp_common.c
  Log:
  Add a debug message if the connection is not reused.
  
  Revision  Changes    Path
  1.25      +14 -11    jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c
  
  Index: jk_ajp_common.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- jk_ajp_common.c	13 Feb 2002 01:07:18 -0000	1.24
  +++ jk_ajp_common.c	10 May 2002 23:58:40 -0000	1.25
  @@ -59,7 +59,7 @@
    * Description: common stuff for bi-directional protocols ajp13/ajp14.     *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
    * Author:      Henri Gomez <hgomez@slib.fr>                               *
  - * Version:     $Revision: 1.24 $                                           *
  + * Version:     $Revision: 1.25 $                                           *
    ***************************************************************************/
   
   
  @@ -455,8 +455,9 @@
       }
   
       d->msg = (char *)jk_b_get_string(msg);
  -    if (d->msg)
  +    if (d->msg) {
           jk_xlate_from_ascii(d->msg, strlen(d->msg));
  +    }
   
       jk_log(l, JK_LOG_DEBUG, "ajp_unmarshal_response: status = %d\n", d->status);
   
  @@ -756,7 +757,7 @@
   static int ajp_read_into_msg_buff(ajp_endpoint_t  *ae,
                                     jk_ws_service_t *r,
                                     jk_msg_buf_t    *msg,
  -                                  unsigned         len,
  +                                  int         len,
                                     jk_logger_t     *l)
   {
       unsigned char *read_buf = jk_b_get_buff(msg);
  @@ -875,7 +876,7 @@
   		 * doing a read (not yet) 
   	 	 */
   		if (s->is_chunked || ae->left_bytes_to_send > 0) {
  -			unsigned len = ae->left_bytes_to_send;
  +			int len = ae->left_bytes_to_send;
   			if (len > AJP13_MAX_SEND_BODY_SZ) 
   				len = AJP13_MAX_SEND_BODY_SZ;
               		if ((len = ajp_read_into_msg_buff(ae, s, op->post, len, l)) < 0) {
  @@ -937,7 +938,7 @@
   
           case JK_AJP13_GET_BODY_CHUNK:
               {
  -		unsigned len = (unsigned)jk_b_get_int(msg);
  +		int len = (int)jk_b_get_int(msg);
   
                   if(len > AJP13_MAX_SEND_BODY_SZ) {
                       len = AJP13_MAX_SEND_BODY_SZ;
  @@ -963,13 +964,16 @@
           case JK_AJP13_END_RESPONSE:
               {
                   ae->reuse = (int)jk_b_get_byte(msg);
  -                
  -                if((ae->reuse & 0X01) != ae->reuse) {
  +
  +                if( ! ae->reuse ) {
                       /*
                        * Strange protocol error.
                        */
  +                    jk_log(l, JK_LOG_DEBUG, "Reuse: %d\n", ae->reuse );
                       ae->reuse = JK_FALSE;
                   }
  +                /* Reuse in all cases */
  +                ae->reuse = JK_TRUE;
               }
               return JK_AJP13_END_RESPONSE;
   	    break;
  @@ -1304,8 +1308,6 @@
   int JK_METHOD ajp_done(jk_endpoint_t **e,
                          jk_logger_t    *l)
   {
  -    jk_log(l, JK_LOG_DEBUG, "Into jk_endpoint_t::done\n");
  -
       if (e && *e && (*e)->endpoint_private) {
           ajp_endpoint_t *p = (*e)->endpoint_private;
           int reuse_ep = p->reuse;
  @@ -1328,12 +1330,13 @@
                       }
                       JK_LEAVE_CS(&w->cs, rc);
                       if(i < w->ep_cache_sz) {
  -                        return JK_TRUE;
  +                            jk_log(l, JK_LOG_DEBUG, "Into jk_endpoint_t::done, recycling
connection\n");
  +                            return JK_TRUE;
                       }
                   }
               }
           }
  -
  +        jk_log(l, JK_LOG_DEBUG, "Into jk_endpoint_t::done, closing connection %d\n", reuse_ep);
           ajp_close_endpoint(p, l);
           *e = NULL;
   
  
  
  

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