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, 01 Jun 2004 20:16:47 GMT
stas        2004/06/01 13:16:46

  Modified:    src/modules/perl modperl_filter.c
  Log:
  check the return status in input filter read ap_get_brigade and throw
  exception if failed
  
  Revision  Changes    Path
  1.91      +7 -2      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.90
  retrieving revision 1.91
  diff -u -u -r1.90 -r1.91
  --- modperl_filter.c	19 May 2004 06:44:46 -0000	1.90
  +++ modperl_filter.c	1 Jun 2004 20:16:46 -0000	1.91
  @@ -692,11 +692,16 @@
       apr_size_t len = 0;
   
       if (!filter->bb_in) {
  +        apr_status_t rc;
           /* This should be read only once per handler invocation! */
           filter->bb_in = apr_brigade_create(filter->pool,
                                              filter->f->c->bucket_alloc);
  -        ap_get_brigade(filter->f->next, filter->bb_in,
  -                       filter->input_mode, filter->block, filter->readbytes);
  +        rc = ap_get_brigade(filter->f->next, filter->bb_in,
  +                            filter->input_mode, filter->block,
  +                            filter->readbytes);
  +        if (!(rc == APR_SUCCESS || rc == APR_EOF)) {
  +            modperl_croak(aTHX_ rc, "Apache::Filter::read"); 
  +        }
           MP_TRACE_f(MP_FUNC, MP_FILTER_NAME_FORMAT
                      "retrieving bb: 0x%lx\n",
                      MP_FILTER_NAME(filter->f),
  
  
  

Mime
View raw message