diff options
Diffstat (limited to 'buckets/ap_buf.c')
-rw-r--r-- | buckets/ap_buf.c | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/buckets/ap_buf.c b/buckets/ap_buf.c index 1c6238da6..69de82cd4 100644 --- a/buckets/ap_buf.c +++ b/buckets/ap_buf.c @@ -72,19 +72,7 @@ APR_EXPORT(ap_status_t) ap_bucket_destroy(ap_bucket *e) return APR_SUCCESS; } -APR_EXPORT(ap_status_t) ap_brigade_destroy(void *data) -{ - ap_bucket_brigade *b = data; - - ap_bucket_list_destroy(b->head); - /* The brigade itself is allocated out of a pool, so we don't actually - * want to free it. If we did, we would do that free() here. - */ - - return APR_SUCCESS; -} - -APR_EXPORT(ap_status_t) ap_bucket_list_destroy(ap_bucket *e) +static ap_status_t ap_bucket_list_destroy(ap_bucket *e) { ap_bucket *cur = e; ap_bucket *next; @@ -97,6 +85,18 @@ APR_EXPORT(ap_status_t) ap_bucket_list_destroy(ap_bucket *e) return APR_SUCCESS; } +APR_EXPORT(ap_status_t) ap_brigade_destroy(void *data) +{ + ap_bucket_brigade *b = data; + + ap_bucket_list_destroy(b->head); + /* The brigade itself is allocated out of a pool, so we don't actually + * want to free it. If we did, we would do that free() here. + */ + + return APR_SUCCESS; +} + APR_EXPORT(ap_bucket_brigade *) ap_brigade_create(ap_pool_t *p) { ap_bucket_brigade *b; @@ -137,8 +137,8 @@ APR_EXPORT(int) ap_brigade_to_iovec(ap_bucket_brigade *b, orig = vec; e = b->head; while (e && nvec) { - vec->iov_base = (void *)ap_get_bucket_char_str(e); vec->iov_len = ap_get_bucket_len(e); + vec->iov_base = (void *)e->read(e); e = e->next; --nvec; ++vec; @@ -203,14 +203,6 @@ APR_EXPORT(ap_status_t) ap_brigade_to_iol(ap_ssize_t *total_bytes, return APR_SUCCESS; } -APR_EXPORT(const char *) ap_get_bucket_char_str(ap_bucket *b) -{ - if (b) { - return b->read(b); - } - return NULL; -} - APR_EXPORT(int) ap_get_bucket_len(ap_bucket *b) { if (b) { |