mturk       2005/06/18 08:35:44

  Modified:    jni/native/src network.c
  Log:
  APR_EOF is also the 'reset' event caused by remote closing the socket.
  
  Revision  Changes    Path
  1.35      +23 -9     jakarta-tomcat-connectors/jni/native/src/network.c
  
  Index: network.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/network.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- network.c 18 Jun 2005 15:10:22 -0000      1.34
  +++ network.c 18 Jun 2005 15:35:44 -0000      1.35
  @@ -38,6 +38,7 @@
   static volatile apr_uint32_t sp_err_recv = 0;
   static volatile apr_uint32_t sp_tmo_recv = 0;
   static volatile apr_uint32_t sp_rst_recv = 0;
  +static volatile apr_status_t sp_erl_recv = 0;
   
   /* Fake private pool struct to deal with APR private's socket
    * struct not exposing function to access the pool.
  @@ -83,6 +84,7 @@
       fprintf(stderr, "Receive timeouts        : %d\n", sp_tmo_recv);
       fprintf(stderr, "Receive errors          : %d\n", sp_err_recv);
       fprintf(stderr, "Receive resets          : %d\n", sp_rst_recv);
  +    fprintf(stderr, "Last receive error      : %d\n", sp_erl_recv);
   }
   
   #endif
  @@ -603,10 +605,13 @@
               APR_STATUS_IS_TIMEUP(ss))
               sp_tmo_recv++;
           else if (APR_STATUS_IS_ECONNABORTED(ss) ||
  -                 APR_STATUS_IS_ECONNRESET(ss))
  +                 APR_STATUS_IS_ECONNRESET(ss) ||
  +                 APR_STATUS_IS_EOF(ss))
               sp_rst_recv++;
  -        else
  +        else {
               sp_err_recv++;
  +            sp_erl_recv = ss;
  +        }
       }
   #endif
       if (ss == APR_SUCCESS)
  @@ -660,10 +665,13 @@
               APR_STATUS_IS_TIMEUP(ss))
               sp_tmo_recv++;
           else if (APR_STATUS_IS_ECONNABORTED(ss) ||
  -                 APR_STATUS_IS_ECONNRESET(ss))
  +                 APR_STATUS_IS_ECONNRESET(ss) ||
  +                 APR_STATUS_IS_EOF(ss))
               sp_rst_recv++;
  -        else
  +        else {
               sp_err_recv++;
  +            sp_erl_recv = ss;
  +        }
       }
   #endif
   cleanup:
  @@ -702,10 +710,13 @@
               APR_STATUS_IS_TIMEUP(ss))
               sp_tmo_recv++;
           else if (APR_STATUS_IS_ECONNABORTED(ss) ||
  -                 APR_STATUS_IS_ECONNRESET(ss))
  +                 APR_STATUS_IS_ECONNRESET(ss) ||
  +                 APR_STATUS_IS_EOF(ss))
               sp_rst_recv++;
  -        else
  +        else {
               sp_err_recv++;
  +            sp_erl_recv = ss;
  +        }
       }
   #endif
       if (ss == APR_SUCCESS)
  @@ -753,10 +764,13 @@
               APR_STATUS_IS_TIMEUP(ss))
               sp_tmo_recv++;
           else if (APR_STATUS_IS_ECONNABORTED(ss) ||
  -                 APR_STATUS_IS_ECONNRESET(ss))
  +                 APR_STATUS_IS_ECONNRESET(ss) ||
  +                 APR_STATUS_IS_EOF(ss))
               sp_rst_recv++;
  -        else
  +        else {
               sp_err_recv++;
  +            sp_erl_recv = ss;
  +        }
       }
   #endif
       if (ss == APR_SUCCESS)
  
  
  

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

Reply via email to