perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steve...@apache.org
Subject svn commit: r1052232 - in /perl/modperl/trunk: Changes src/modules/perl/modperl_io_apache.c
Date Thu, 23 Dec 2010 11:45:32 GMT
Author: stevehay
Date: Thu Dec 23 11:45:32 2010
New Revision: 1052232

URL: http://svn.apache.org/viewvc?rev=1052232&view=rev
Log:
Make PerlIOApache_write() throw an APR::Error object, rather than just a string error, if
modperl_wbucket_write() fails.

Modified:
    perl/modperl/trunk/Changes
    perl/modperl/trunk/src/modules/perl/modperl_io_apache.c

Modified: perl/modperl/trunk/Changes
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?rev=1052232&r1=1052231&r2=1052232&view=diff
==============================================================================
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Thu Dec 23 11:45:32 2010
@@ -12,6 +12,10 @@ Also refer to the Apache::Test changes l
 
 =item 2.0.5-dev
 
+PerlIOApache_write() now throws an APR::Error object, rather than just a string
+error, if modperl_wbucket_write() fails.
+[Steve Hay]
+
 Authentication tests fail with LWP 5.815 and later
 [Doug Schrag]
 

Modified: perl/modperl/trunk/src/modules/perl/modperl_io_apache.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_io_apache.c?rev=1052232&r1=1052231&r2=1052232&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_io_apache.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_io_apache.c Thu Dec 23 11:45:32 2010
@@ -126,7 +126,6 @@ PerlIOApache_write(pTHX_ PerlIO *f, cons
     PerlIOApache *st = PerlIOSelf(f, PerlIOApache);
     modperl_config_req_t *rcfg = modperl_config_req_get(st->r);
     apr_size_t bytes = 0;
-    apr_status_t rv;
 
     if (!(PerlIOBase(f)->flags & PERLIO_F_CANWRITE)) {
         return 0;
@@ -137,10 +136,9 @@ PerlIOApache_write(pTHX_ PerlIO *f, cons
     MP_TRACE_o(MP_FUNC, "%4db [%s]", count,
                MP_TRACE_STR_TRUNC(rcfg->wbucket->pool, vbuf, count));
 
-    rv = modperl_wbucket_write(aTHX_ rcfg->wbucket, vbuf, &count);
-    if (rv != APR_SUCCESS) {
-        Perl_croak(aTHX_ modperl_error_strerror(aTHX_ rv));
-    }
+    MP_RUN_CROAK(modperl_wbucket_write(aTHX_ rcfg->wbucket, vbuf, &count),
+                 ":Apache2 IO write");
+
     bytes += count;
 
     return (SSize_t) bytes;



Mime
View raw message