apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: apr-util/include apr_buckets.h
Date Fri, 31 May 2002 20:51:20 GMT
rbb         2002/05/31 13:51:20

  Modified:    buckets  apr_buckets_eos.c apr_buckets_file.c
                        apr_buckets_flush.c apr_buckets_heap.c
                        apr_buckets_mmap.c apr_buckets_pipe.c
                        apr_buckets_pool.c apr_buckets_socket.c
               include  apr_buckets.h
  Log:
  Make buckets advertise if they are filled with metadata or not.
  Long-term, we most likely want to extend this so that buckets can have
  more states than just "data" or "metadata".  For now, this is enough.
  
  Revision  Changes    Path
  1.35      +5 -4      apr-util/buckets/apr_buckets_eos.c
  
  Index: apr_buckets_eos.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_eos.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- apr_buckets_eos.c	18 Apr 2002 18:34:27 -0000	1.34
  +++ apr_buckets_eos.c	31 May 2002 20:51:19 -0000	1.35
  @@ -64,10 +64,11 @@
   
   APU_DECLARE(apr_bucket *) apr_bucket_eos_make(apr_bucket *b)
   {
  -    b->length    = 0;
  -    b->start     = 0;
  -    b->data      = NULL;
  -    b->type      = &apr_bucket_type_eos;
  +    b->length      = 0;
  +    b->start       = 0;
  +    b->data        = NULL;
  +    b->is_metadata = 1;
  +    b->type        = &apr_bucket_type_eos;
       
       return b;
   }
  
  
  
  1.74      +1 -0      apr-util/buckets/apr_buckets_file.c
  
  Index: apr_buckets_file.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_file.c,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- apr_buckets_file.c	15 May 2002 23:17:43 -0000	1.73
  +++ apr_buckets_file.c	31 May 2002 20:51:19 -0000	1.74
  @@ -205,6 +205,7 @@
   #endif
   
       b = apr_bucket_shared_make(b, f, offset, len);
  +    b->is_metadata = 0;
       b->type = &apr_bucket_type_file;
   
       return b;
  
  
  
  1.27      +5 -4      apr-util/buckets/apr_buckets_flush.c
  
  Index: apr_buckets_flush.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_flush.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- apr_buckets_flush.c	18 Apr 2002 18:34:27 -0000	1.26
  +++ apr_buckets_flush.c	31 May 2002 20:51:19 -0000	1.27
  @@ -64,10 +64,11 @@
   
   APU_DECLARE(apr_bucket *) apr_bucket_flush_make(apr_bucket *b)
   {
  -    b->length    = 0;
  -    b->start     = 0;
  -    b->data      = NULL;
  -    b->type      = &apr_bucket_type_flush;
  +    b->length      = 0;
  +    b->start       = 0;
  +    b->data        = NULL;
  +    b->is_metadata = 1;
  +    b->type        = &apr_bucket_type_flush;
       
       return b;
   }
  
  
  
  1.45      +1 -0      apr-util/buckets/apr_buckets_heap.c
  
  Index: apr_buckets_heap.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_heap.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- apr_buckets_heap.c	18 Apr 2002 18:41:21 -0000	1.44
  +++ apr_buckets_heap.c	31 May 2002 20:51:19 -0000	1.45
  @@ -106,6 +106,7 @@
       }
   
       b = apr_bucket_shared_make(b, h, 0, length);
  +    b->is_metadata = 0;
       b->type = &apr_bucket_type_heap;
   
       return b;
  
  
  
  1.51      +1 -0      apr-util/buckets/apr_buckets_mmap.c
  
  Index: apr_buckets_mmap.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_mmap.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- apr_buckets_mmap.c	19 Apr 2002 06:07:50 -0000	1.50
  +++ apr_buckets_mmap.c	31 May 2002 20:51:19 -0000	1.51
  @@ -120,6 +120,7 @@
       }
   
       b = apr_bucket_shared_make(b, m, start, length);
  +    b->is_metadata = 0;
       b->type = &apr_bucket_type_mmap;
   
       return b;
  
  
  
  1.49      +6 -5      apr-util/buckets/apr_buckets_pipe.c
  
  Index: apr_buckets_pipe.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_pipe.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- apr_buckets_pipe.c	18 Apr 2002 18:41:21 -0000	1.48
  +++ apr_buckets_pipe.c	31 May 2002 20:51:19 -0000	1.49
  @@ -128,11 +128,12 @@
        * stream so the bucket(s) that it sets aside will be the heap
        * buckets created by pipe_bucket_read() above.
        */
  -    b->type     = &apr_bucket_type_pipe;
  -    b->length   = (apr_size_t)(-1);
  -    b->start    = -1;
  -    b->data     = p;
  -
  +    b->type        = &apr_bucket_type_pipe;
  +    b->length      = (apr_size_t)(-1);
  +    b->start       = -1;
  +    b->data        = p;
  +    b->is_metadata = 0;
  +    
       return b;
   }
   
  
  
  
  1.30      +1 -0      apr-util/buckets/apr_buckets_pool.c
  
  Index: apr_buckets_pool.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_pool.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- apr_buckets_pool.c	18 Apr 2002 18:34:27 -0000	1.29
  +++ apr_buckets_pool.c	31 May 2002 20:51:19 -0000	1.30
  @@ -145,6 +145,7 @@
       p->list = b->list;
   
       b = apr_bucket_shared_make(b, p, 0, length);
  +    b->is_metadata = 0;
       b->type = &apr_bucket_type_pool;
   
       /* pre-initialize heap bucket member */
  
  
  
  1.39      +5 -4      apr-util/buckets/apr_buckets_socket.c
  
  Index: apr_buckets_socket.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_socket.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- apr_buckets_socket.c	18 Apr 2002 18:41:21 -0000	1.38
  +++ apr_buckets_socket.c	31 May 2002 20:51:19 -0000	1.39
  @@ -123,10 +123,11 @@
        * Note that typically the socket is allocated from the connection pool
        * so it will disappear when the connection is finished. 
        */
  -    b->type     = &apr_bucket_type_socket;
  -    b->length   = (apr_size_t)(-1);
  -    b->start    = -1;
  -    b->data     = p;
  +    b->type        = &apr_bucket_type_socket;
  +    b->length      = (apr_size_t)(-1);
  +    b->start       = -1;
  +    b->is_metadata = 0;
  +    b->data        = p;
   
       return b;
   }
  
  
  
  1.140     +11 -0     apr-util/include/apr_buckets.h
  
  Index: apr_buckets.h
  ===================================================================
  RCS file: /home/cvs/apr-util/include/apr_buckets.h,v
  retrieving revision 1.139
  retrieving revision 1.140
  diff -u -r1.139 -r1.140
  --- apr_buckets.h	29 May 2002 22:35:27 -0000	1.139
  +++ apr_buckets.h	31 May 2002 20:51:20 -0000	1.140
  @@ -261,6 +261,10 @@
       void (*free)(void *e);
       /** The freelist from which this bucket was allocated */
       apr_bucket_alloc_t *list;
  +    /**
  +     * Does the bucket contain metadata
  +     */
  +    int is_metadata;
   };
   
   /** A list of buckets */
  @@ -445,6 +449,13 @@
    * @param e The bucket to initialize
    */
   #define APR_BUCKET_INIT(e)	APR_RING_ELEM_INIT((e), link)
  +
  +/**
  + * Determind if a bucket contains metadata
  + * @param e The bucket to inspect
  + * @return true or false
  + */
  +#define APR_BUCKET_IS_METADATA(e)    (e->is_metadata)
   
   /**
    * Determine if a bucket is a FLUSH bucket
  
  
  

Mime
View raw message