perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/xs/maps apache_functions.map
Date Sun, 20 Jan 2002 18:37:05 GMT
dougm       02/01/20 10:37:05

  Modified:    src/modules/perl modperl_filter.c modperl_filter.h
               t/filter/TestFilter input_body.pm input_msg.pm
               t/protocol/TestProtocol echo_filter.pm
               xs/Apache/Filter Apache__Filter.h
               xs/maps  apache_functions.map
  Log:
  adjust to ap_get_brigade and input filter api changes
  
  Revision  Changes    Path
  1.30      +7 -3      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.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- modperl_filter.c	8 Jan 2002 00:04:33 -0000	1.29
  +++ modperl_filter.c	20 Jan 2002 18:37:04 -0000	1.30
  @@ -113,7 +113,9 @@
       return mg ? (modperl_filter_t *)mg->mg_ptr : NULL;
   }
   
  -int modperl_run_filter(modperl_filter_t *filter, ap_input_mode_t mode,
  +int modperl_run_filter(modperl_filter_t *filter,
  +                       ap_input_mode_t mode,
  +                       apr_read_type_e block,
                          apr_off_t *readbytes)
   {
       AV *args = Nullav;
  @@ -137,6 +139,7 @@
   
       if (filter->mode == MP_INPUT_FILTER_MODE) {
           av_push(args, newSViv(mode));
  +        av_push(args, newSViv(block));
           av_push(args, newSViv(*readbytes));
       }
   
  @@ -374,7 +377,7 @@
       }
       else {
           filter = modperl_filter_new(f, bb, MP_OUTPUT_FILTER_MODE);
  -        status = modperl_run_filter(filter, 0, 0);
  +        status = modperl_run_filter(filter, 0, 0, 0);
       }
   
       switch (status) {
  @@ -390,6 +393,7 @@
   apr_status_t modperl_input_filter_handler(ap_filter_t *f,
                                             apr_bucket_brigade *bb,
                                             ap_input_mode_t mode,
  +                                          apr_read_type_e block,
                                             apr_off_t *readbytes)
   {
       modperl_filter_t *filter;
  @@ -402,7 +406,7 @@
       }
       else {
           filter = modperl_filter_new(f, bb, MP_INPUT_FILTER_MODE);
  -        status = modperl_run_filter(filter, mode, readbytes);
  +        status = modperl_run_filter(filter, mode, block, readbytes);
       }
   
       switch (status) {
  
  
  
  1.11      +4 -1      modperl-2.0/src/modules/perl/modperl_filter.h
  
  Index: modperl_filter.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- modperl_filter.h	9 Aug 2001 16:52:51 -0000	1.10
  +++ modperl_filter.h	20 Jan 2002 18:37:04 -0000	1.11
  @@ -25,7 +25,9 @@
   
   modperl_filter_t *modperl_filter_mg_get(pTHX_ SV *obj);
   
  -int modperl_run_filter(modperl_filter_t *filter, ap_input_mode_t mode,
  +int modperl_run_filter(modperl_filter_t *filter,
  +                       ap_input_mode_t mode,
  +                       apr_read_type_e block,
                          apr_off_t *readbytes);
   
   /* output filters */
  @@ -53,6 +55,7 @@
   apr_status_t modperl_input_filter_handler(ap_filter_t *f,
                                             apr_bucket_brigade *bb,
                                             ap_input_mode_t mode,
  +                                          apr_read_type_e block,
                                             apr_off_t *readbytes);
   
   void modperl_input_filter_register_connection(conn_rec *c);
  
  
  
  1.9       +2 -2      modperl-2.0/t/filter/TestFilter/input_body.pm
  
  Index: input_body.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/input_body.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- input_body.pm	21 Dec 2001 11:30:38 -0000	1.8
  +++ input_body.pm	20 Jan 2002 18:37:05 -0000	1.9
  @@ -11,11 +11,11 @@
   use APR::Bucket ();
   
   sub handler : FilterRequestHandler {
  -    my($filter, $bb, $mode, $readbytes) = @_;
  +    my($filter, $bb, $mode, $block, $readbytes) = @_;
   
       my $ctx_bb = APR::Brigade->new($filter->r->pool);
   
  -    my $rv = $filter->next->get_brigade($ctx_bb, $mode, $readbytes);
  +    my $rv = $filter->next->get_brigade($ctx_bb, $mode, $block, $readbytes);
   
       if ($rv != APR::SUCCESS) {
           return $rv;
  
  
  
  1.9       +2 -2      modperl-2.0/t/filter/TestFilter/input_msg.pm
  
  Index: input_msg.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/input_msg.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- input_msg.pm	21 Dec 2001 11:30:38 -0000	1.8
  +++ input_msg.pm	20 Jan 2002 18:37:05 -0000	1.9
  @@ -12,11 +12,11 @@
   my $to_url = '/TestFilter::input_msg::response';
   
   sub handler : FilterConnectionHandler {
  -    my($filter, $bb, $mode, $readbytes) = @_;
  +    my($filter, $bb, $mode, $block, $readbytes) = @_;
   
       my $ctx_bb = APR::Brigade->new($filter->c->pool);
   
  -    my $rv = $filter->next->get_brigade($ctx_bb, $mode, $readbytes);
  +    my $rv = $filter->next->get_brigade($ctx_bb, $mode, $block, $readbytes);
   
       if ($rv != APR::SUCCESS) {
           return $rv;
  
  
  
  1.3       +2 -2      modperl-2.0/t/protocol/TestProtocol/echo_filter.pm
  
  Index: echo_filter.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/protocol/TestProtocol/echo_filter.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- echo_filter.pm	2 Aug 2001 04:51:11 -0000	1.2
  +++ echo_filter.pm	20 Jan 2002 18:37:05 -0000	1.3
  @@ -5,7 +5,7 @@
   use APR::Bucket ();
   use APR::Brigade ();
   use APR::Const -compile => qw(SUCCESS EOF);
  -use Apache::Const -compile => qw(MODE_BLOCKING);
  +use Apache::Const -compile => qw(MODE_GETLINE);
   use APR::Lib ();
   
   sub handler {
  @@ -15,7 +15,7 @@
   
       for (;;) {
           my $rv = $c->input_filters->get_brigade($bb,
  -                                                Apache::MODE_BLOCKING);
  +                                                Apache::MODE_GETLINE);
   
           if ($rv != APR::SUCCESS or $bb->empty) {
               my $error = APR::strerror($rv);
  
  
  
  1.17      +3 -1      modperl-2.0/xs/Apache/Filter/Apache__Filter.h
  
  Index: Apache__Filter.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/Apache/Filter/Apache__Filter.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Apache__Filter.h	18 Dec 2001 03:56:44 -0000	1.16
  +++ Apache__Filter.h	20 Jan 2002 18:37:05 -0000	1.17
  @@ -63,10 +63,12 @@
   static apr_status_t mpxs_ap_get_brigade(pTHX_ ap_filter_t *filter,
                                           apr_bucket_brigade *brigade,
                                           ap_input_mode_t mode,
  +                                        apr_read_type_e block,
                                           SV *svreadbytes)
   {
       apr_off_t readbytes = svreadbytes ? SvIV(svreadbytes) : 0;
  -    apr_status_t status = ap_get_brigade(filter, brigade, mode, &readbytes);
  +    apr_status_t status = ap_get_brigade(filter, brigade,
  +                                         mode, block, &readbytes);
   
       if (svreadbytes) {
           sv_setiv(svreadbytes, readbytes);
  
  
  
  1.41      +3 -1      modperl-2.0/xs/maps/apache_functions.map
  
  Index: apache_functions.map
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_functions.map,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- apache_functions.map	4 Dec 2001 22:42:29 -0000	1.40
  +++ apache_functions.map	20 Jan 2002 18:37:05 -0000	1.41
  @@ -204,7 +204,9 @@
   ~ap_add_output_filter
   ~ap_add_input_filter
    ap_get_brigade | mpxs_ | \
  -               filter, bucket, mode=AP_MODE_NONBLOCKING, SV *:readbytes=Nullsv
  +               filter, bucket, mode=AP_MODE_READBYTES, \
  +               block=APR_BLOCK_READ, \
  +               SV *:readbytes=Nullsv
    ap_pass_brigade
    ap_register_input_filter
    ap_register_output_filter
  
  
  

Mime
View raw message