You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Cliff Woolley <jw...@virginia.edu> on 2002/09/05 08:25:14 UTC

Re: cvs commit: httpd-2.0/modules/http http_protocol.c

On 5 Sep 2002 brianp@apache.org wrote:

>        bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
>   +    if (bb == NULL) {
>   +        r->connection->keepalive = AP_CONN_CLOSE;
>   +        return -1;
>   +    }

apr_brigade_create() will never return NULL.  This bit is unnecessary.

--Cliff


Re: cvs commit: httpd-2.0/modules/http http_protocol.c

Posted by Brian Pane <br...@apache.org>.
Cliff Woolley wrote:

>On Wed, 4 Sep 2002, Brian Pane wrote:
>
>  
>
>>That's not guaranteed.  The API, as currently documented, only
>>guarantees that it will return an apr_bucket_brigade*, not that
>>it will be non-null.
>>    
>>
>
>It's non-null as long as apr_palloc returns non-null.  Which it is.  In
>other words, it is part of the API.  You want me to document it?  Fine, I
>will.  :)
>  
>

Thanks.  With the current documentation, there's no guarantee
that apr_brigade_create() uses apr_palloc().  In fact, the comments
for apr_brigade_create() explicitly state that "data is not allocated
of the pool."

Brian




Re: cvs commit: httpd-2.0/modules/http http_protocol.c

Posted by Cliff Woolley <jw...@virginia.edu>.
On Wed, 4 Sep 2002, Brian Pane wrote:

> That's not guaranteed.  The API, as currently documented, only
> guarantees that it will return an apr_bucket_brigade*, not that
> it will be non-null.

It's non-null as long as apr_palloc returns non-null.  Which it is.  In
other words, it is part of the API.  You want me to document it?  Fine, I
will.  :)


Re: cvs commit: httpd-2.0/modules/http http_protocol.c

Posted by Brian Pane <br...@apache.org>.
Cliff Woolley wrote:

>On 5 Sep 2002 brianp@apache.org wrote:
>
>  
>
>>       bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
>>  +    if (bb == NULL) {
>>  +        r->connection->keepalive = AP_CONN_CLOSE;
>>  +        return -1;
>>  +    }
>>    
>>
>
>apr_brigade_create() will never return NULL.  This bit is unnecessary.
>  
>

That's not guaranteed.  The API, as currently documented, only
guarantees that it will return an apr_bucket_brigade*, not that
it will be non-null.

Brian