You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2005/02/14 18:25:24 UTC

cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp_common.c

mturk       2005/02/14 09:25:24

  Modified:    jk/native/common jk_ajp_common.c
  Log:
  Add host and port placeholders. Used for logging and jkstatus display.
  Count bytes readed and tranferred to/from Tomcat.
  
  Revision  Changes    Path
  1.76      +12 -10    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.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- jk_ajp_common.c	6 Feb 2005 13:45:11 -0000	1.75
  +++ jk_ajp_common.c	14 Feb 2005 17:25:24 -0000	1.76
  @@ -895,7 +895,8 @@
       }
   
       if ((rc = jk_tcp_socket_sendfull(ae->sd, jk_b_get_buff(msg),
  -                               jk_b_get_len(msg))) > 0) {
  +                                     jk_b_get_len(msg))) > 0) {
  +        ae->endpoint.wr += jk_b_get_len(msg);
           JK_TRACE_EXIT(l);
           return JK_TRUE;
       }
  @@ -937,7 +938,7 @@
           JK_TRACE_EXIT(l);
           return JK_FALSE;
       }
  -
  +    ae->endpoint.rd += rc;
       header = ((unsigned int)head[0] << 8) | head[1];
   
       if (ae->proto == AJP13_PROTO) {
  @@ -1001,6 +1002,7 @@
           JK_TRACE_EXIT(l);
           return JK_FALSE;
       }
  +    ae->endpoint.rd += rc;
   
       if (ae->proto == AJP13_PROTO) {
           if (JK_IS_DEBUG_LEVEL(l))
  @@ -1714,16 +1716,16 @@
   
       if (pThis && pThis->worker_private) {
           ajp_worker_t *p = pThis->worker_private;
  -        port = jk_get_worker_port(props, p->name, port);
  -        host = jk_get_worker_host(props, p->name, host);
  +        p->port = jk_get_worker_port(props, p->name, port);
  +        p->host = jk_get_worker_host(props, p->name, host);
   
           if (JK_IS_DEBUG_LEVEL(l))
               jk_log(l, JK_LOG_DEBUG,
  -                   "worker %s contact is %s:%d",
  -                   p->name, host, port);
  +                   "worker %s contact is '%s:%d'",
  +                   p->name, p->host, p->port);
   
  -        if (port > 1024 && host) {
  -            if (jk_resolve(host, port, &p->worker_inet_addr)) {
  +        if (p->port > 1024) {
  +            if (jk_resolve(p->host, p->port, &p->worker_inet_addr)) {
                   JK_TRACE_EXIT(l);
                   return JK_TRUE;
               }
  @@ -1732,7 +1734,7 @@
           }
           jk_log(l, JK_LOG_ERROR,
                  "invalid host and port %s %d",
  -               ((host == NULL) ? "NULL" : host), port);
  +               ((p->host == NULL) ? "NULL" : p->host), p->port);
       }
       else {
           JK_LOG_NULL_PARAMS(l);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org