cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2003-01-22 Thread stas
stas2003/01/22 16:31:28

  Modified:src/modules/perl mod_perl.c mod_perl.h modperl_filter.c
modperl_util.h
   .Changes
   xs/Apache/RequestIO Apache__RequestIO.h
   xs/Apache/SubRequest Apache__SubRequest.h
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  - add a new MP_FAILURE_CROAK macro to handle failures
  - all response functions are now returning status and the callers check
  and croak on failure or progate them further.
  
  Revision  ChangesPath
  1.147 +10 -4 modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.146
  retrieving revision 1.147
  diff -u -r1.146 -r1.147
  --- mod_perl.c12 Jan 2003 02:15:58 -  1.146
  +++ mod_perl.c23 Jan 2003 00:31:28 -  1.147
  @@ -709,12 +709,12 @@
   wb-r = r;
   }
   
  -void modperl_response_finish(request_rec *r)
  +apr_status_t modperl_response_finish(request_rec *r)
   {
   MP_dRCFG;
   
   /* flush output buffer */
  -modperl_wbucket_flush(rcfg-wbucket);
  +return modperl_wbucket_flush(rcfg-wbucket);
   }
   
   static int modperl_response_handler_run(request_rec *r, int finish)
  @@ -730,7 +730,10 @@
   }
   
   if (finish) {
  -modperl_response_finish(r);
  +apr_status_t rc = modperl_response_finish(r);
  +if (rc != APR_SUCCESS) {
  +retval = rc;
  +}
   }
   
   return retval;
  @@ -803,7 +806,10 @@
   #endif
   
   /* flush output buffer after interpreter is putback */
  -modperl_response_finish(r);
  +apr_status_t rc = modperl_response_finish(r);
  +if (rc != APR_SUCCESS) {
  +retval = rc;
  +}
   
   switch (rcfg-status) {
 case HTTP_MOVED_TEMPORARILY:
  
  
  
  1.56  +1 -1  modperl-2.0/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- mod_perl.h12 Dec 2002 10:05:08 -  1.55
  +++ mod_perl.h23 Jan 2003 00:31:28 -  1.56
  @@ -88,7 +88,7 @@
   void xs_init(pTHX);
   
   void modperl_response_init(request_rec *r);
  -void modperl_response_finish(request_rec *r);
  +apr_status_t modperl_response_finish(request_rec *r);
   int modperl_response_handler(request_rec *r);
   int modperl_response_handler_cgi(request_rec *r);
   
  
  
  
  1.45  +5 -6  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.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- modperl_filter.c  17 Jan 2003 03:08:31 -  1.44
  +++ modperl_filter.c  23 Jan 2003 00:31:28 -  1.45
  @@ -23,6 +23,8 @@
   ap_log_error(APLOG_MARK, APLOG_WARNING,
0, r-server, %s did not send an HTTP header,
r-uri);
  +/* XXX: bodytext == NULL here */
  +return status;
   }
   else if (!bodytext) {
   return APR_SUCCESS;
  @@ -190,17 +192,14 @@
* first modperl_input_filter_read, so it must be
* destroyed at the end of the filter invocation
*/
  -/* XXX: may be the filter must consume all the data? add a
  - * test to check */
   apr_brigade_destroy(filter-bb_in);
   filter-bb_in = NULL;
   }
  -modperl_input_filter_flush(filter);
  +MP_FAILURE_CROAK(modperl_input_filter_flush(filter));
   }
   else {
  -modperl_output_filter_flush(filter);
  +MP_FAILURE_CROAK(modperl_output_filter_flush(filter));
   }
  -
   
   return status;
   }
  @@ -457,7 +456,7 @@
   
   if (filter-flush  len == 0) {
   /* if len  0 then $filter-write will flush */
  -modperl_output_filter_flush(filter);
  +MP_FAILURE_CROAK(modperl_output_filter_flush(filter));
   }
   
   return len;
  
  
  
  1.38  +7 -0  modperl-2.0/src/modules/perl/modperl_util.h
  
  Index: modperl_util.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- modperl_util.h11 Jan 2003 00:02:16 -  1.37
  +++ modperl_util.h23 Jan 2003 00:31:28 -  1.38
  @@ -50,6 +50,13 @@
   #define MP_magical_tie(sv, mg_flags) \
   SvFLAGS((SV*)sv) |= mg_flags
   
  +#define 

cvs commit: modperl-2.0 Makefile.PL Changes

2003-01-22 Thread stas
stas2003/01/22 21:16:30

  Modified:.Makefile.PL Changes
  Log:
  the top level 'make test' now descends into the ModPerl-Registry dir
  to run 'make test' there
  
  Revision  ChangesPath
  1.90  +24 -1 modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- Makefile.PL   11 Jan 2003 03:20:54 -  1.89
  +++ Makefile.PL   23 Jan 2003 05:16:30 -  1.90
  @@ -29,7 +29,6 @@
   use Apache::TestReportPerl ();
   use Apache::TestSmokePerl ();
   use Apache::TestTrace;
  -use Apache::TestMM qw(test);
   use ModPerl::TestRun ();
   use ModPerl::Code ();
   use ModPerl::MM ();
  @@ -442,6 +441,30 @@
   ModPerl::MM::add_dep(\$string, clean = 'modperl_src_clean');
   ModPerl::MM::add_dep(\$string, clean = 'test_clean');
   $string;
  +}
  +
  +sub MY::test {
  +
  +my $env = Apache::TestConfig-passenv_makestr();
  +
  +my $preamble = Apache::TestConfig::WIN32 ?  : EOF;
  +PASSENV = $env
  +EOF
  +
  +return $preamble . 'EOF';
  +test_clean :
  + $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
  + t/TEST -clean
  + 
  +run_tests : test_clean
  + $(PASSENV) \
  + $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
  + t/TEST
  + cd ModPerl-Registry  make test
  +
  +test :: pure_all run_tests test_clean
  +EOF
  +
   }
   
   sub MY::postamble {
  
  
  
  1.112 +3 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- Changes   23 Jan 2003 04:06:38 -  1.111
  +++ Changes   23 Jan 2003 05:16:30 -  1.112
  @@ -10,6 +10,9 @@
   
   =item 1.99_09-dev
   
  +the top level 'make test' now descend into the ModPerl-Registry dir
  +to run 'make test' there [Stas]
  +
   Apache::Test: don't inherit loading of the mod_perl object from the
   system-wide config, since we already add it [Stas]