httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject [PATCH] add error checking to file reads
Date Sat, 25 Oct 1997 19:08:27 GMT
Maybe this'll catch the Win32 problem (which I can't reproduce)?

Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_protocol.c,v
retrieving revision 1.166
diff -u -r1.166 http_protocol.c
--- http_protocol.c     1997/10/07 19:34:03     1.166
+++ http_protocol.c     1997/10/25 19:05:39
@@ -1623,6 +1623,11 @@
                && ferror(f) && errno == EINTR &&
!r->connection->aborted)
             continue;

+       if(n < 0) {
+           aplog_error(APLOG_MARK, APLOG_CRIT, r->server, "read
failed");
+           break;
+       }
+
         if (n < 1) {
             break;
         }

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Mime
View raw message