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/native/common jk_ajp_common.c
Date Thu, 21 Apr 2005 11:51:07 GMT
mturk       2005/04/21 04:51:07

  Modified:    jk/native/common jk_ajp_common.c
  Log:
  Close the socket only if the lock can be obtained.
  
  Revision  Changes    Path
  1.100     +5 -4      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.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- jk_ajp_common.c	21 Apr 2005 11:41:06 -0000	1.99
  +++ jk_ajp_common.c	21 Apr 2005 11:51:06 -0000	1.100
  @@ -729,19 +729,20 @@
       JK_ENTER_CS(&aw->cs, rc);
       if (rc) {
           unsigned int i;
  -        /* Close existing endpoint socket */
  +        /* Mark existing endpoint socket as closed */
           ae->sd = -1;
           for (i = 0; i < aw->ep_cache_sz; i++) {
               /* Find cache slot with usable socket */
  -            if (aw->ep_cache[i] && aw->ep_cache[i]->sd > 0) {
  +            if (aw->ep_cache[i] && aw->ep_cache[i]->sd != -1) {
                   ae->sd = aw->ep_cache[i]->sd;
  -                 aw->ep_cache[i]->sd = -1;
  +                aw->ep_cache[i]->sd = -1;
                   break;
               }
           }
           JK_LEAVE_CS(&aw->cs, rc);
  +        /* Close previous socket */
  +        jk_close_socket(sock);
       }
  -    jk_close_socket(sock);
   }
   
   /*
  
  
  

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


Mime
View raw message