ap_bucket_destroy(destroy_me);
destroy_me = NULL;
}
- if ((e->type == ap_eos_type()) || (e->type == ap_file_type()) ||
- (e->type == ap_pipe_type())) {
+ if (AP_BUCKET_IS_EOS(e) || AP_BUCKET_IS_FILE(e) ||
+ AP_BUCKET_IS_PIPE(e)) {
pass_the_brigade = 1;
}
else {
char chunk_hdr[20]; /* enough space for the snprintf below */
AP_BRIGADE_FOREACH(e, b) {
- if (e->type == ap_eos_type()) {
+ if (AP_BUCKET_IS_EOS(e)) {
/* there shouldn't be anything after the eos */
eos = e;
break;
nbytes = 0; /* in case more points to another brigade */
more = NULL;
AP_BRIGADE_FOREACH(e, b) {
- if (e->type == ap_eos_type()) {
+ if (AP_BUCKET_IS_EOS(e)) {
break;
}
- else if (e->type == ap_file_type()) {
+ else if (AP_BUCKET_IS_FILE(e)) {
ap_bucket_file *a = e->data;
/* Assume there is at most one AP_BUCKET_FILE in the brigade */
fd = a->fd;
/* Completed iterating over the brigades, now determine if we want to
* buffer the brigade or send the brigade out on the network
*/
- if (!fd && (!more) && (nbytes < MIN_SIZE_TO_WRITE) && (e->type != ap_eos_type())) {
+ if (!fd && (!more) && (nbytes < MIN_SIZE_TO_WRITE) && !AP_BUCKET_IS_EOS(e)) {
ap_save_brigade(f, &ctx->b, &b);
return APR_SUCCESS;
}
}
e = AP_BRIGADE_FIRST(b);
- if (f->c->remain == 0 && e->type == ap_eos_type()) {
+ if (f->c->remain == 0 && AP_BUCKET_IS_EOS(e)) {
bb = ap_brigade_split(b, AP_BUCKET_NEXT(e));
ctx->b = bb;
return APR_SUCCESS;
timeout);
}
b = AP_BRIGADE_FIRST(bb);
- if (b->type == ap_eos_type()) {
+ if (AP_BUCKET_IS_EOS(b)) {
r->connection->remain = 0;
break;
}
API_EXPORT(apr_status_t) ap_pass_brigade(ap_filter_t *next, ap_bucket_brigade *bb)
{
if (next) {
- if (AP_BRIGADE_LAST(bb)->type == ap_eos_type() && next->r) {
+ ap_bucket *e;
+ if ((e = AP_BRIGADE_LAST(bb)) && AP_BUCKET_IS_EOS(e) && next->r) {
next->r->eos_sent = 1;
}
return next->frec->filter_func.out_func(next, bb);