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:44:12 GMT
wrowe       2002/11/05 23:44:11

  Modified:    modules/ssl ssl_engine_io.c
  Log:
    Per Justin's feedback, this still needed a little work to get the
    four cases (block/nonblock read/nodata) straight.
  
  Revision  Changes    Path
  1.99      +15 -13    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.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- ssl_engine_io.c	6 Nov 2002 07:29:36 -0000	1.98
  +++ ssl_engine_io.c	6 Nov 2002 07:44:11 -0000	1.99
  @@ -644,10 +644,11 @@
                    * On win32 in particular, but perhaps on other kernels,
                    * a blocking call isn't 'always' blocking.
                    */
  +                if (*len > 0) {
  +                    inctx->rc = APR_SUCCESS;
  +                    break;
  +                }
                   if (inctx->block == APR_NONBLOCK_READ) {
  -                    if (*len > 0) {
  -                        inctx->rc = APR_SUCCESS;
  -                    }
                       break;
                   }
               }
  @@ -676,26 +677,27 @@
                    */
                   inctx->rc = APR_EAGAIN;
   
  +                if (*len > 0) {
  +                    inctx->rc = APR_SUCCESS;
  +                    break;
  +                }
                   if (inctx->block == APR_NONBLOCK_READ) {
  -                    /* Already read something, return APR_SUCCESS instead. */
  -                    if (*len > 0) {
  -                        inctx->rc = APR_SUCCESS;
  -                    }
  -                    break; /* non fatal error */
  +                    break;
                   }
  -                continue; /* try again */
  +                continue;  /* Blocking and nothing yet?  Try again. */
               }
               else if (ssl_err == SSL_ERROR_SYSCALL) {
                   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;
  +                        break;
  +                    }
                       if (inctx->block == APR_NONBLOCK_READ) {
  -                        if (*len > 0) {
  -                            inctx->rc = APR_SUCCESS;
  -                        }
                           break;
                       }
  -                    continue;
  +                    continue;  /* Blocking and nothing yet?  Try again. */
                   }
                   else {
                       ap_log_error(APLOG_MARK, APLOG_ERR, inctx->rc, c->base_server,
  
  
  

Mime
View raw message