httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl ssl_engine_io.c
Date Wed, 06 Nov 2002 07:29:37 GMT
wrowe       2002/11/05 23:29:36

  Modified:    modules/ssl ssl_engine_io.c
  Log:
    Rule one of winsock and other one-offs (even unix EINTR) ... blocking
    isn't necessarily blocking.  Should not have changed this in the prior
    commit, and adding the same retry to the -1/EAGAIN|EINTR case.
  
  Revision  Changes    Path
  1.98      +15 -7     httpd-2.0/modules/ssl/ssl_engine_io.c
  
  Index: ssl_engine_io.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_io.c,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- ssl_engine_io.c	6 Nov 2002 07:21:47 -0000	1.97
  +++ ssl_engine_io.c	6 Nov 2002 07:29:36 -0000	1.98
  @@ -640,11 +640,16 @@
                */
               if (APR_STATUS_IS_EAGAIN(inctx->rc)
                       || APR_STATUS_IS_EINTR(inctx->rc)) {
  -                /* Already read something, return APR_SUCCESS instead. */
  -                if (*len > 0) {
  -                    inctx->rc = APR_SUCCESS;
  +                /* Already read something, return APR_SUCCESS instead. 
  +                 * On win32 in particular, but perhaps on other kernels,
  +                 * a blocking call isn't 'always' blocking.
  +                 */
  +                if (inctx->block == APR_NONBLOCK_READ) {
  +                    if (*len > 0) {
  +                        inctx->rc = APR_SUCCESS;
  +                    }
  +                    break;
                   }
  -                break;
               }
               else {
                   if (*len > 0) {
  @@ -684,10 +689,13 @@
                   if (APR_STATUS_IS_EAGAIN(inctx->rc)
                           || APR_STATUS_IS_EINTR(inctx->rc)) {
                       /* Already read something, return APR_SUCCESS instead. */
  -                    if (*len > 0) {
  -                        inctx->rc = APR_SUCCESS;
  +                    if (inctx->block == APR_NONBLOCK_READ) {
  +                        if (*len > 0) {
  +                            inctx->rc = APR_SUCCESS;
  +                        }
  +                        break;
                       }
  -                    break;
  +                    continue;
                   }
                   else {
                       ap_log_error(APLOG_MARK, APLOG_ERR, inctx->rc, c->base_server,
  
  
  

Mime
View raw message