httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwool...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl ssl_engine_io.c
Date Sat, 23 Nov 2002 21:19:03 GMT
jwoolley    2002/11/23 13:19:03

  Modified:    modules/ssl ssl_engine_io.c
  Log:
  Fix some possibly-uninitialized variables.
  
  Revision  Changes    Path
  1.101     +14 -10    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.100
  retrieving revision 1.101
  diff -u -d -u -r1.100 -r1.101
  --- ssl_engine_io.c	7 Nov 2002 06:26:48 -0000	1.100
  +++ ssl_engine_io.c	23 Nov 2002 21:19:03 -0000	1.101
  @@ -401,7 +401,7 @@
                                       char *c, apr_size_t *len)
   {
       apr_size_t actual = 0;
  -    apr_status_t status;
  +    apr_status_t status = APR_SUCCESS;
    
       while (!APR_BRIGADE_EMPTY(bb)) {
           apr_bucket *b = APR_BRIGADE_FIRST(bb);
  @@ -450,9 +450,7 @@
   
               c += consume;
               actual += consume;
  -        }
   
  -        if (b->start >= 0) {
               if (consume >= b->length) {
                   /* This physical bucket was consumed */
                   apr_bucket_delete(b);
  @@ -463,6 +461,9 @@
                   b->length -= consume;
               }
           }
  +        else if (b->length == 0) {
  +            apr_bucket_delete(b);
  +        }
   
           /* This could probably be actual == *len, but be safe from stray
            * photons. */
  @@ -955,13 +956,6 @@
           type = "abortive";
       }
       else switch (sslconn->shutdown_type) {
  -      case SSL_SHUTDOWN_TYPE_UNSET:
  -      case SSL_SHUTDOWN_TYPE_STANDARD:
  -        /* send close notify, but don't wait for clients close notify
  -           (standard compliant and safe, so it's the DEFAULT!) */
  -        shutdown_type = SSL_RECEIVED_SHUTDOWN;
  -        type = "standard";
  -        break;
         case SSL_SHUTDOWN_TYPE_UNCLEAN:
           /* perform no close notify handshake at all
              (violates the SSL/TLS standard!) */
  @@ -973,6 +967,16 @@
              (standard compliant, but usually causes connection hangs) */
           shutdown_type = 0;
           type = "accurate";
  +        break;
  +      default:
  +        /*
  +         * case SSL_SHUTDOWN_TYPE_UNSET:
  +         * case SSL_SHUTDOWN_TYPE_STANDARD:
  +         */
  +        /* send close notify, but don't wait for clients close notify
  +           (standard compliant and safe, so it's the DEFAULT!) */
  +        shutdown_type = SSL_RECEIVED_SHUTDOWN;
  +        type = "standard";
           break;
       }
   
  
  
  

Mime
View raw message