On Wed, 22 Feb 2006 11:42:18 -0600, William A. Rowe, Jr. wrote: >Seeing this on windows trunk, 1.2.x, 0.9.x, will backport tonight. > >Brian, did you intend to go ahead and backport this (or your other OS2 >efforts) to 1.2.x / 0.9.x?
Yes, I intend backporting this when I have a few moments to spare. I'm starting to work my way through the test failures as time permits. I'm afraid I've let it go a bit so there's a fair bit to do. >[EMAIL PROTECTED] wrote: >> Author: bjh >> Date: Wed Feb 22 03:26:16 2006 >> New Revision: 379754 >> >> URL: http://svn.apache.org/viewcvs?rev=379754&view=rev >> Log: >> OS/2: Add proper error handling when internal calls to apr_file_flush() fail >> within apr_file_read(), apr_file_gets() and apr_file_seek(). >> >> Modified: >> apr/apr/trunk/file_io/os2/readwrite.c >> apr/apr/trunk/file_io/os2/seek.c >> >> Modified: apr/apr/trunk/file_io/os2/readwrite.c >> URL: >> http://svn.apache.org/viewcvs/apr/apr/trunk/file_io/os2/readwrite.c?rev=379754&r1=379753&r2=379754&view=diff >> ============================================================================== >> --- apr/apr/trunk/file_io/os2/readwrite.c (original) >> +++ apr/apr/trunk/file_io/os2/readwrite.c Wed Feb 22 03:26:16 2006 >> @@ -42,7 +42,13 @@ >> apr_thread_mutex_lock(thefile->mutex); >> >> if (thefile->direction == 1) { >> - apr_file_flush(thefile); >> + int rv = apr_file_flush(thefile); >> + >> + if (rv != APR_SUCCESS) { >> + apr_thread_mutex_unlock(thefile->mutex); >> + return rv; >> + } >> + >> thefile->bufpos = 0; >> thefile->direction = 0; >> thefile->dataRead = 0; >> @@ -299,6 +305,10 @@ >> for (i = 0; i < len-1; i++) { >> readlen = 1; >> rv = apr_file_read(thefile, str+i, &readlen); >> + >> + if (rv != APR_SUCCESS) { >> + break; >> + } >> >> if (readlen != 1) { >> rv = APR_EOF; >> >> Modified: apr/apr/trunk/file_io/os2/seek.c >> URL: >> http://svn.apache.org/viewcvs/apr/apr/trunk/file_io/os2/seek.c?rev=379754&r1=379753&r2=379754&view=diff >> ============================================================================== >> --- apr/apr/trunk/file_io/os2/seek.c (original) >> +++ apr/apr/trunk/file_io/os2/seek.c Wed Feb 22 03:26:16 2006 >> @@ -27,7 +27,12 @@ >> ULONG rc; >> >> if (thefile->direction == 1) { >> - apr_file_flush(thefile); >> + apr_status_t rv = apr_file_flush(thefile); >> + >> + if (rv != APR_SUCCESS) { >> + return rv; >> + } >> + >> thefile->bufpos = thefile->direction = thefile->dataRead = 0; >> } -- ______________________________________________________________________________ | Brian Havard | "He is not the messiah! | | [EMAIL PROTECTED] | He's a very naughty boy!" - Life of Brian | ------------------------------------------------------------------------------
