perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/src/modules/perl modperl_filter.c
Date Tue, 13 May 2003 09:18:58 GMT
stas        2003/05/13 02:18:58

  Modified:    src/modules/perl modperl_filter.c
  Log:
  simplify modperl_input_filter_flush to call the appropriate eos/flush
  functions and add tracing from there. remove a potential problem where
  ->eos is reset when flush is sent
  
  Revision  Changes    Path
  1.64      +13 -10    modperl-2.0/src/modules/perl/modperl_filter.c
  
  Index: modperl_filter.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- modperl_filter.c	9 May 2003 03:33:01 -0000	1.63
  +++ modperl_filter.c	13 May 2003 09:18:58 -0000	1.64
  @@ -39,6 +39,8 @@
       apr_bucket *b = apr_bucket_eos_create(ba);
       APR_BRIGADE_INSERT_TAIL(filter->bb_out, b);
       ((modperl_filter_ctx_t *)filter->f->ctx)->sent_eos = 1;
  +    MP_TRACE_f(MP_FUNC, MP_FILTER_NAME_FORMAT
  +               "write out: EOS bucket\n", MP_FILTER_NAME(filter->f));
       return APR_SUCCESS;
   }
   
  @@ -47,6 +49,8 @@
       apr_bucket_alloc_t *ba = filter->f->c->bucket_alloc;
       apr_bucket *b = apr_bucket_flush_create(ba);
       APR_BRIGADE_INSERT_TAIL(filter->bb_out, b);
  +    MP_TRACE_f(MP_FUNC, MP_FILTER_NAME_FORMAT
  +               "write out: FLUSH bucket\n", MP_FILTER_NAME(filter->f));
       return APR_SUCCESS;
   }
   
  @@ -653,16 +657,15 @@
           /* no data should be sent after EOS has been sent */
           return filter->rc;
       }
  -    
  -    if (filter->eos || filter->flush) {
  -        MP_TRACE_f(MP_FUNC, MP_FILTER_NAME_FORMAT
  -                   "write out: %s bucket\n",
  -                   MP_FILTER_NAME(filter->f),
  -                   filter->eos ? "EOS" : "FLUSH");
  -        filter->rc = filter->eos ?
  -            send_input_eos(filter) : send_input_flush(filter);
  -        /* modperl_brigade_dump(filter->bb_out, stderr); */
  -        filter->flush = filter->eos = 0;
  +
  +    if (filter->flush) {
  +        filter->rc = send_input_flush(filter);
  +        filter->flush = 0;
  +    }
  +
  +    if (filter->eos) {
  +        filter->rc = send_input_eos(filter);
  +        filter->eos = 0;
       }
       
       return filter->rc;
  
  
  

Mime
View raw message