httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Wed, 06 Feb 2002 16:16:55 GMT
trawick     02/02/06 08:16:55

  Modified:    server   core.c
  Log:
  yet another tweak to empty brigade checking on entry to core_input_filter():
  
    since APR_BRIGADE_EMPTY() assumes a non-empty brigade, we have to check
    before invoking that macro
  
    since APR_BRIGADE_EMPTY() can make a brigade empty, we have to check
    after invoking that macro
  
  An obvious variation of this fix would be to change APR_BRIGADE_NORMALIZE()
  to deal with empty brigades.
  
  Revision  Changes    Path
  1.146     +5 -2      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.145
  retrieving revision 1.146
  diff -u -r1.145 -r1.146
  --- core.c	6 Feb 2002 02:24:18 -0000	1.145
  +++ core.c	6 Feb 2002 16:16:55 -0000	1.146
  @@ -3058,11 +3058,14 @@
           APR_BRIGADE_INSERT_TAIL(ctx->b, e);
           net->in_ctx = ctx;
       }
  -
  +    else if (APR_BRIGADE_EMPTY(ctx->b)) {
  +        return APR_EOF;
  +    }
  +    
       /* ### This is bad. */
       APR_BRIGADE_NORMALIZE(ctx->b);
   
  -    /* check for empty brigade *AFTER* APR_BRIGADE_NORMALIZE()
  +    /* check for empty brigade again *AFTER* APR_BRIGADE_NORMALIZE()
        * If we have lost our socket bucket (see above), we are EOF.
        *
        * Ideally, this should be returning SUCCESS with EOS bucket, but
  
  
  

Mime
View raw message