Different? In terms of the destroy function? You're right (as I just
posted). I don't think transient should be using free().
The two buckets are the same except for transient behavior.
Cheers,
-g
On Wed, Feb 28, 2001 at 06:37:05PM -0500, Jeff Trawick wrote:
> For an immortal bucket, the data is typically a non-writeable string.
> But we do a free() on it when we get rid of the bucket representing
> it. This seems obviously broken
>
> Why is transient any different in this respect? The bucket code
> doesn't know where the data lives (other than knowing that it needs a
> meaningful setaside function).
>
> Index: buckets/apr_buckets_simple.c
> ===================================================================
> RCS file: /home/cvspublic/apr-util/buckets/apr_buckets_simple.c,v
> retrieving revision 1.24
> diff -u -r1.24 apr_buckets_simple.c
> --- buckets/apr_buckets_simple.c 2001/02/28 02:19:02 1.24
> +++ buckets/apr_buckets_simple.c 2001/02/28 23:32:17
> @@ -151,7 +151,7 @@
>
> const apr_bucket_type_t apr_bucket_type_immortal = {
> "IMMORTAL", 5,
> - free,
> + apr_bucket_destroy_notimpl,
> simple_read,
> apr_bucket_setaside_notimpl,
> apr_bucket_simple_split,
> @@ -160,7 +160,7 @@
>
> APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_transient = {
> "TRANSIENT", 5,
> - free,
> + apr_bucket_destroy_notimpl,
> simple_read,
> transient_setaside,
> apr_bucket_simple_split,
>
> --
> Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
> http://www.geocities.com/SiliconValley/Park/9289/
> Born in Roswell... married an alien...
--
Greg Stein, http://www.lyra.org/