httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: cvs commit: apache-2.0/src/lib/apr/file_io/unix open.c
Date Mon, 13 Sep 1999 13:30:50 GMT
Ryan Bloom wrote:
> 
> >
> >   -    if ((*new)->filedes < 0 && (*new)->filehand == NULL) {
> >   +    if ((*new)->filedes < 0 || (*new)->filehand == NULL) {
> >           (*new)->filedes = -1;
> >           (*new)->eof_hit = 1;
> >            return errno;
> 
> This is wrong.  This says that we NEVER open the file correctly.  This is
> because we only ever set one of the two options, either the filedes or the
> filehand, NEVER both.  We are checking for the error condition, not the
> successful case.  Either the filedes or the filehand WILL be not set after
> each open.  I have serious doubts that the code even works anymore.  If
> it does, it is only because we aren't checking return code properly.

BTW, after all the patches I did yesterday, I get an Apache that doesn't
instantly die, and will accept a request (though it ditches the response
for some reason as yet undiagnosed).

All the non-warning patches fixed a bug, though possibly not in the best
way.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi

Mime
View raw message