rbb 99/06/09 08:55:59
Modified: apr/network_io/unix sendrecv.c
include apr_errno.h
Log:
ap_send and ap_recv need to report back when the time limit has expired. This
requires a new status code, and a small change to the funcs.
Revision Changes Path
1.10 +10 -2 apache-apr/apr/network_io/unix/sendrecv.c
Index: sendrecv.c
===================================================================
RCS file: /home/cvs/apache-apr/apr/network_io/unix/sendrecv.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- sendrecv.c 1999/05/25 17:03:48 1.9
+++ sendrecv.c 1999/06/09 15:55:55 1.10
@@ -83,8 +83,12 @@
srv = select(FD_SETSIZE, NULL, &fdset, NULL, &tv);
} while (srv == -1 && errno == EINTR);
- if (srv < 1) {
+ if (srv == 0) {
(*len) = -1;
+ return APR_TIMEUP;
+ }
+ else if (srv < 0) {
+ (*len) = -1;
return errno;
}
else {
@@ -119,7 +123,11 @@
srv = select(FD_SETSIZE, &fdset, NULL, NULL, &tv);
} while (srv == -1 && errno == EINTR);
- if (srv < 1) {
+ if (srv == 0) {
+ (*len) = -1;
+ return APR_TIMEUP;
+ }
+ else if (srv < 0) {
(*len) = -1;
return errno;
}
1.17 +1 -1 apache-apr/include/apr_errno.h
Index: apr_errno.h
===================================================================
RCS file: /home/cvs/apache-apr/include/apr_errno.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- apr_errno.h 1999/06/03 19:43:58 1.16
+++ apr_errno.h 1999/06/09 15:55:58 1.17
@@ -399,7 +399,7 @@
#define APR_NOTDETACH 5004
#define APR_CHILD_DONE 5005
#define APR_CHILD_NOTDONE 5006
-
+#define APR_TIMEUP 5007
#ifdef __cplusplus
}