httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq-2/env mod_apreq.c
Date Mon, 21 Jun 2004 17:53:44 GMT
joes        2004/06/21 10:53:44

  Modified:    env      mod_apreq.c
  Log:
  Drop spurious doxygen comments and add small optimization to apreq_filter prefetch code:
don't need to scan in common case where filter f == r->proto_input_filters.
  
  Revision  Changes    Path
  1.52      +13 -11    httpd-apreq-2/env/mod_apreq.c
  
  Index: mod_apreq.c
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/env/mod_apreq.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- mod_apreq.c	20 Jun 2004 17:09:58 -0000	1.51
  +++ mod_apreq.c	21 Jun 2004 17:53:44 -0000	1.52
  @@ -57,7 +57,7 @@
   }
   
   
  -/** The warehouse. */
  +/* The warehouse. */
   struct env_config {
       apreq_jar_t        *jar;
       apreq_request_t    *req;
  @@ -67,7 +67,7 @@
       apr_ssize_t         max_brigade;
   };
   
  -/** Tracks the filter state */
  +/* Tracks the filter state */
   struct filter_ctx {
       apr_bucket_brigade *bb;
       apr_bucket_brigade *spool;
  @@ -106,7 +106,7 @@
   
   
   #define APREQ_MODULE_NAME "APACHE2"
  -#define APREQ_MODULE_MAGIC_NUMBER 20040620
  +#define APREQ_MODULE_MAGIC_NUMBER 20040621
   
   
   static void apache2_log(const char *file, int line, int level, 
  @@ -514,9 +514,9 @@
           }
       }
       else if (!ctx->saw_eos) {
  -        ap_filter_t *in;
           /* bb == NULL, so this is a prefetch read! */
           apr_off_t total_read = 0;
  +
           bb = apr_brigade_create(ctx->bb->p, ctx->bb->bucket_alloc);
   
           while (total_read < readbytes) {
  @@ -553,15 +553,17 @@
           /* Adding "f" to the protocol filter chain ensures the 
            * spooled data is preserved across internal redirects.
            */
  -        for (in = r->input_filters; in != r->proto_input_filters; 
  -             in = in->next)
  -        {
  -            if (f == in) {
  -                r->proto_input_filters = f;
  -                break;
  +        if (f != r->proto_input_filters) {
  +            ap_filter_t *in;
  +            for (in = r->input_filters; in != r->proto_input_filters; 
  +                 in = in->next)
  +            {
  +                if (f == in) {
  +                    r->proto_input_filters = f;
  +                    break;
  +                }
               }
           }
  -
       }
       else
           return APR_SUCCESS;
  
  
  

Mime
View raw message