You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@locus.apache.org on 2000/10/03 19:19:29 UTC

cvs commit: apache-2.0/src/ap ap_buckets.c

stoddard    00/10/03 10:19:29

  Modified:    src/ap   ap_buckets.c
  Log:
  ap_split_brigade needs to check to see if there are more buckets left in the brigade
  before proceeding with the split.
  
  Revision  Changes    Path
  1.19      +2 -0      apache-2.0/src/ap/ap_buckets.c
  
  Index: ap_buckets.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ap_buckets.c	2000/09/18 19:30:23	1.18
  +++ ap_buckets.c	2000/10/03 17:19:29	1.19
  @@ -113,6 +113,8 @@
   {
       ap_bucket_brigade *a;
       ap_bucket *f;
  +    if (e == AP_BRIGADE_SENTINEL(b))
  +        return NULL;
       a = ap_brigade_create(b->p);
       f = AP_RING_LAST(&b->list);
       AP_RING_UNSPLICE(e, f, link);
  
  
  

Re: cvs commit: apache-2.0/src/ap ap_buckets.c

Posted by Bill Stoddard <st...@raleigh.ibm.com>.
> On Tue, 3 Oct 2000, Bill Stoddard wrote:
> > >
> > > I kind of dislike this.  It is non-orthogonal to what the bucket split
> > > functions do.  I would rather see the ap_split_brigade function always
> > > return two brigades.  Either may be an empty brigade, but there will
> > > always be two valid brigades.
> > >
> > > Ryan
> >
> > The chunk filter checks for more == NULL. I suppose we could check for
> > AP_BRIGADE_EMPTY. Is that what you are suggesting? What would this buy us
(other
> > than overhead to create an empty brigade)?
>
> Yes, this is what I am suggesting.  This buys us a common interface
> between buckets and bucket_brigades.  Which means a simpler interface for
> programmers to learn.
>
> As for the cost of creating an empty brigade, that cost is minimal, and
> can be avoided by checking to ensure there is more in the brigade before
> calling split.

I see your point.

Bill


Re: cvs commit: apache-2.0/src/ap ap_buckets.c

Posted by rb...@covalent.net.
On Tue, 3 Oct 2000, Bill Stoddard wrote:
> >
> > I kind of dislike this.  It is non-orthogonal to what the bucket split
> > functions do.  I would rather see the ap_split_brigade function always
> > return two brigades.  Either may be an empty brigade, but there will
> > always be two valid brigades.
> >
> > Ryan
> 
> The chunk filter checks for more == NULL. I suppose we could check for
> AP_BRIGADE_EMPTY. Is that what you are suggesting? What would this buy us (other
> than overhead to create an empty brigade)?

Yes, this is what I am suggesting.  This buys us a common interface
between buckets and bucket_brigades.  Which means a simpler interface for
programmers to learn.

As for the cost of creating an empty brigade, that cost is minimal, and
can be avoided by checking to ensure there is more in the brigade before
calling split.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: apache-2.0/src/ap ap_buckets.c

Posted by Bill Stoddard <st...@raleigh.ibm.com>.
> >   Modified:    src/ap   ap_buckets.c
> >   Log:
> >   ap_split_brigade needs to check to see if there are more buckets left in
the brigade
> >   before proceeding with the split.
>
> I kind of dislike this.  It is non-orthogonal to what the bucket split
> functions do.  I would rather see the ap_split_brigade function always
> return two brigades.  Either may be an empty brigade, but there will
> always be two valid brigades.
>
> Ryan

The chunk filter checks for more == NULL. I suppose we could check for
AP_BRIGADE_EMPTY. Is that what you are suggesting? What would this buy us (other
than overhead to create an empty brigade)?

Bill


Re: cvs commit: apache-2.0/src/ap ap_buckets.c

Posted by rb...@covalent.net.
On 3 Oct 2000 stoddard@locus.apache.org wrote:

> stoddard    00/10/03 10:19:29
> 
>   Modified:    src/ap   ap_buckets.c
>   Log:
>   ap_split_brigade needs to check to see if there are more buckets left in the brigade
>   before proceeding with the split.

I kind of dislike this.  It is non-orthogonal to what the bucket split
functions do.  I would rather see the ap_split_brigade function always
return two brigades.  Either may be an empty brigade, but there will
always be two valid brigades.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: apache-2.0/src/ap ap_buckets.c

Posted by rb...@covalent.net.
On 3 Oct 2000 stoddard@locus.apache.org wrote:

> stoddard    00/10/03 10:19:29
> 
>   Modified:    src/ap   ap_buckets.c
>   Log:
>   ap_split_brigade needs to check to see if there are more buckets left in the brigade
>   before proceeding with the split.

I kind of dislike this.  It is non-orthogonal to what the bucket split
functions do.  I would rather see the ap_split_brigade function always
return two brigades.  Either may be an empty brigade, but there will
always be two valid brigades.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------