summaryrefslogtreecommitdiffstats
path: root/server/error_bucket.c
diff options
context:
space:
mode:
authorCliff Woolley <jwoolley@apache.org>2001-09-23 00:37:04 +0200
committerCliff Woolley <jwoolley@apache.org>2001-09-23 00:37:04 +0200
commitb73c29403db78bb32af099440e28ca89a039c9ae (patch)
tree1446012d0e80d6c1864a61f61fd2da0d7a15ef80 /server/error_bucket.c
parentw3c tidy to convert to xhtml (diff)
downloadapache2-b73c29403db78bb32af099440e28ca89a039c9ae.tar.xz
apache2-b73c29403db78bb32af099440e28ca89a039c9ae.zip
revert buckets sms phase 1 patch. the group wants to get rid of SMS, so
the buckets can't use it. I'll implement a free-list scheme private to the buckets next. in the meanwhile we're back to using malloc/free directly instead of via the std sms. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91117 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/error_bucket.c')
-rw-r--r--server/error_bucket.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/server/error_bucket.c b/server/error_bucket.c
index 460433f5f8..6484feb2b9 100644
--- a/server/error_bucket.c
+++ b/server/error_bucket.c
@@ -68,20 +68,17 @@ static apr_status_t error_read(apr_bucket *b, const char **str,
return APR_SUCCESS;
}
-static void error_destroy(void *data) {
- ap_bucket_error *h = data;
- apr_sms_free(h->sms, h);
-}
-
AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error,
const char *buf, apr_pool_t *p)
{
ap_bucket_error *h;
- h = (ap_bucket_error *)apr_sms_malloc(b->sms, sizeof(*h));
+ h = malloc(sizeof(*h));
+ if (h == NULL) {
+ return NULL;
+ }
h->status = error;
h->data = (buf) ? apr_pstrdup(p, buf) : NULL;
- h->sms = b->sms;
b->length = 0;
b->start = 0;
@@ -93,22 +90,16 @@ AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error,
AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error,
const char *buf, apr_pool_t *p)
{
- apr_sms_t *sms;
- apr_bucket *b;
-
- if (!apr_bucket_global_sms) {
- apr_sms_std_create(&apr_bucket_global_sms);
- }
- sms = apr_bucket_global_sms;
- b = (apr_bucket *)apr_sms_malloc(sms, sizeof(*b));
+ apr_bucket *b = (apr_bucket *)malloc(sizeof(*b));
+
APR_BUCKET_INIT(b);
- b->sms = sms;
+ b->free = free;
return ap_bucket_error_make(b, error, buf, p);
}
AP_DECLARE_DATA const apr_bucket_type_t ap_bucket_type_error = {
"ERROR", 5,
- error_destroy,
+ free,
error_read,
apr_bucket_setaside_notimpl,
apr_bucket_split_notimpl,