httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject cvs commit: httpd-2.0/server util_filter.c
Date Fri, 09 Feb 2001 11:15:06 GMT
gstein      01/02/09 03:15:05

  Modified:    include  util_filter.h
               server   util_filter.c
  Log:
  *) namespace protect the filter_flush() function
  *) don't toss the status value from ap_pass_brigade in ap_fflush; return it
  *) doc/macro nits
  
  Revision  Changes    Path
  1.40      +21 -21    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.39
  retrieving revision 1.40
  diff -u -u -r1.39 -r1.40
  --- util_filter.h	2001/02/09 07:04:51	1.39
  +++ util_filter.h	2001/02/09 11:14:59	1.40
  @@ -398,69 +398,69 @@
    * to flush the brigade if the brigade buffer overflows.
    * @param bb The brigade to flush
    * @param ctx The filter to pass the brigade to
  - * @deffunc apr_status_t filter_flush(apr_bucket_brigade *bb, void *ctx)
  + * @deffunc apr_status_t ap_filter_flush(apr_bucket_brigade *bb, void *ctx)
    */
  -apr_status_t filter_flush(apr_bucket_brigade *bb, void *ctx);
  +AP_DECLARE(apr_status_t) ap_filter_flush(apr_bucket_brigade *bb, void *ctx);
   
   /**
    * Flush the current brigade down the filter stack
    * @param f the next filter in the stack
    * @param bb The brigade to flush
  - * @deffunc int ap_fflush(ap_filter_t *f, apr_bucket_brigade *bb)
  + * @deffunc apr_status_t ap_fflush(ap_filter_t *f, apr_bucket_brigade *bb)
    */
  -AP_DECLARE(int) ap_fflush(ap_filter_t *f, apr_bucket_brigade *bb);
  +AP_DECLARE(apr_status_t) ap_fflush(ap_filter_t *f, apr_bucket_brigade *bb);
   
   /**
    * Write a buffer for the current filter, buffering if possible.
  - * @param f the filter to write to
  + * @param f the filter doing the writing
    * @param bb The brigade to buffer into
  - * @param str The string to write
  - * @param byte The number of characters in the string
  - * @deffunc int ap_fwrite(ap_filter_t *f, apr_bucket_brigade *bb, const char *str, apr_ssize_t
byte);
  + * @param data The data to write
  + * @param nbyte The number of bytes in the data
  + * @deffunc int ap_fwrite(ap_filter_t *f, apr_bucket_brigade *bb, const char *data, apr_ssize_t
nbyte);
    */
  -#define ap_fwrite(f, bb, str, byte) \
  -	apr_brigade_write(bb, filter_flush, f->next, str, byte)
  +#define ap_fwrite(f, bb, data, nbyte) \
  +	apr_brigade_write(bb, ap_filter_flush, (f)->next, data, nbyte)
   
   /**
    * Write a buffer for the current filter, buffering if possible.
  - * @param f the filter to write to
  + * @param f the filter doing the writing
    * @param bb The brigade to buffer into
    * @param str The string to write
    * @deffunc int ap_fputs(ap_filter_t *f, apr_bucket_brigade *bb, const char *str);
    */
   #define ap_fputs(f, bb, str) \
  -	apr_brigade_puts(bb, filter_flush, f->next, str)
  +	apr_brigade_puts(bb, ap_filter_flush, (f)->next, str)
   
   /**
    * Write a character for the current filter, buffering if possible.
  - * @param f the filter to write to
  + * @param f the filter doing the writing
    * @param bb The brigade to buffer into
  - * @param str The character to write
  - * @deffunc int ap_fputc(ap_filter_t *f, apr_bucket_brigade *bb, char str);
  + * @param c The character to write
  + * @deffunc int ap_fputc(ap_filter_t *f, apr_bucket_brigade *bb, char c);
    */
  -#define ap_fputc(f, bb, str) \
  -	apr_brigade_putc(bb, filter_flush, f->next, str)
  +#define ap_fputc(f, bb, c) \
  +	apr_brigade_putc(bb, ap_filter_flush, (f)->next, c)
   
   /**
    * Write an unspecified number of strings to the current filter
  - * @param f the filter to write to
  + * @param f the filter doing the writing
    * @param bb The brigade to buffer into
    * @param ... The strings to write
    * @deffunc int ap_fputs(ap_filter_t *f, apr_bucket_brigade *bb, ...);
    */
   #define ap_fvputs(f, bb, args...) \
  -	apr_brigade_putstrs(bb, filter_flush, f->next, ##args)
  +	apr_brigade_putstrs(bb, ap_filter_flush, (f)->next, ##args)
   
   /**
    * Output data to the filter in printf format
  - * @param f the filter to write to
  + * @param f the filter doing the writing
    * @param bb The brigade to buffer into
    * @param fmt The format string
    * @param ... The argumets to use to fill out the format string
    * @deffunc int ap_fputs(ap_filter_t *f, apr_bucket_brigade *bb, const char *fmt, ...);
    */
   #define ap_fprintf(f, bb, fmt, args...) \
  -	apr_brigade_printf(bb, filter_flush, f->next, fmt, ##args)
  +	apr_brigade_printf(bb, ap_filter_flush, (f)->next, fmt, ##args)
   
   #ifdef __cplusplus
   }
  
  
  
  1.46      +3 -5      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.45
  retrieving revision 1.46
  diff -u -u -r1.45 -r1.46
  --- util_filter.c	2001/02/09 07:04:52	1.45
  +++ util_filter.c	2001/02/09 11:15:03	1.46
  @@ -266,21 +266,19 @@
       return APR_SUCCESS;
   }
   
  -apr_status_t filter_flush(apr_bucket_brigade *bb, void *ctx)
  +AP_DECLARE(apr_status_t) ap_filter_flush(apr_bucket_brigade *bb, void *ctx)
   {
       ap_filter_t *f = ctx;
   
       return ap_pass_brigade(f, bb);
   }
   
  -AP_DECLARE(int) ap_fflush(ap_filter_t *f, apr_bucket_brigade *bb)
  +AP_DECLARE(apr_status_t) ap_fflush(ap_filter_t *f, apr_bucket_brigade *bb)
   {
       apr_bucket *b;
   
       b = apr_bucket_flush_create();
       APR_BRIGADE_INSERT_TAIL(bb, b);
  -    if (ap_pass_brigade(f->next, bb) != APR_SUCCESS)
  -        return -1;
  -    return 0;
  +    return ap_pass_brigade(f->next, bb);
   }
   
  
  
  

Mime
View raw message