You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/12/29 14:56:30 UTC

cvs commit: httpd-2.0/server util_filter.c

trawick     00/12/29 05:56:30

  Modified:    include  util_filter.h
               server   util_filter.c
  Log:
  ap_save_brigade() can fail, so report what happened via an apr_status_t
  return code.
  
  Revision  Changes    Path
  1.34      +3 -3      httpd-2.0/include/util_filter.h
  
  Index: util_filter.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/util_filter.h,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- util_filter.h	2000/11/14 06:11:24	1.33
  +++ util_filter.h	2000/12/29 13:56:29	1.34
  @@ -399,10 +399,10 @@
    *             new bucket brigade is returned in this location.
    * @param b The bucket brigade to save aside.  This brigade is always empty
    *          on return
  - * @deffunc void ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **save_to, ap_bucket_brigade **b)
  + * @deffunc apr_status_t ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **save_to, ap_bucket_brigade **b)
    */
  -AP_DECLARE(void) ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **save_to,
  -                                        ap_bucket_brigade **b);    
  +AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **save_to,
  +                                         ap_bucket_brigade **b);    
   
   #ifdef __cplusplus
   }
  
  
  
  1.42      +8 -3      httpd-2.0/server/util_filter.c
  
  Index: util_filter.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util_filter.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- util_filter.c	2000/12/01 21:49:24	1.41
  +++ util_filter.c	2000/12/29 13:56:30	1.42
  @@ -242,11 +242,12 @@
       return AP_NOBODY_WROTE;
   }
   
  -AP_DECLARE(void) ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **saveto,
  -                                        ap_bucket_brigade **b)
  +AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f, ap_bucket_brigade **saveto,
  +                                         ap_bucket_brigade **b)
   {
       ap_bucket *e;
       apr_pool_t *p = f->r ? f->r->pool : f->c->pool;
  +    apr_status_t rv;
   
       /* If have never stored any data in the filter, then we had better
        * create an empty bucket brigade so that we can concat.
  @@ -256,7 +257,11 @@
       }
       
       AP_RING_FOREACH(e, &(*b)->list, ap_bucket, link) {
  -        ap_bucket_setaside(e);
  +        rv = ap_bucket_setaside(e);
  +        if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
  +            return rv;
  +        }
       }
       AP_BRIGADE_CONCAT(*saveto, *b);
  +    return APR_SUCCESS;
   }