You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by gs...@locus.apache.org on 2000/05/25 00:27:25 UTC
cvs commit: apache-2.0/src/lib/apr/file_io/unix readwrite.c
gstein 00/05/24 15:27:23
Modified: src/main iol_file.c
src/lib/apr/file_io/unix readwrite.c
Log:
fix two problems with Ryan's recent checkin: missing entries in an
iol_methods structure, and some missing parens in the check_read impl.
also, fix the return value for APR check_read -- it cannot be 0/1. instead,
APR_TIMEUP means that nothing is available and APR_SUCCESS means that
the thing is ready for reading.
Revision Changes Path
1.17 +2 -0 apache-2.0/src/main/iol_file.c
Index: iol_file.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/main/iol_file.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- iol_file.c 2000/05/24 19:19:20 1.16
+++ iol_file.c 2000/05/24 22:27:16 1.17
@@ -136,6 +136,8 @@
file_ap_read,
file_setopt,
file_getopt,
+ NULL,
+ NULL,
file_check_read
};
1.48 +6 -5 apache-2.0/src/lib/apr/file_io/unix/readwrite.c
Index: readwrite.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/readwrite.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- readwrite.c 2000/05/24 19:19:16 1.47
+++ readwrite.c 2000/05/24 22:27:19 1.48
@@ -416,17 +416,18 @@
{
fd_set fds;
int rv;
- struct timeval tv;
+ struct timeval tv = { 0 };
FD_ZERO(&fds);
FD_SET(fd->filedes, &fds);
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- if (rv = select(fd->filedes + 1, &fds, NULL, NULL, &tv) == -1) {
+ if ((rv = select(fd->filedes + 1, &fds, NULL, NULL, &tv)) == -1) {
return errno;
}
+ else if (rv == 0) {
+ return APR_TIMEUP;
+ }
else {
- return rv;
+ return APR_SUCCESS;
}
}